Forum Replies Created
-
AuthorPosts
-
Agreed. Lack of Mark communicating is not a good sign
no, it’s definitely both mono and stereo samples.
I had to run a number of tests after your suggestion – and used the samples from the vsynth demo.
Can confirm that .025 milliseconds is missing from the beginning of both mono and stereo.
I should add that you will need a second editor (one that you know gives correct results) to hear the difference. It is very subtle and extremely difficult to hear, but it happening.
It’s not first run with the playing. it is all playing of all waveforms.
Sample I was using to test from the vsynth was bassdrum1.wav
on playing. the sound sorta sounds fine – but it’s not, it’s missing about .025milliseconds from the beginning
Here’s the code:
Monkey12345678910111213141516171819202122232425262728293031323334353637383940414243Class MyWindow Extends Windowfield sound:SoundMethod New()Super.New( "My Window", Size.X, Size.Y, WindowFlags.Resizable )' Layout = "letterbox"Layout = "fill"' sound = Sound.Load( "asset::kick.wav" )sound = Sound.Load( "asset::bassdrum1.wav" )' sound = Sound.Load( "asset::MHBB_SN.wav" )EndMethod OnRender( canvas:Canvas ) Override'fill the screen canvas with a colorcanvas.Color = Color.Blackcanvas.DrawRect( 0, 0, Width, Height )canvas.Color = Color.Whitecanvas.DrawText( "return to play", 10, 10 )End'respond to any key pressesMethod OnKeyEvent( event:KeyEvent ) OverrideSelect event.Typecase EventType.KeyDownSelect event.KeyCase Key.Entersound.Play()End SelectEnd SelectEndEndok, added to the git bug
Update to this. I’ve done a quick test with the VSynth, and it seems to play the samples correctly without missing the beginning. so I think It can now be definitely a bug
more on this one.
I’ve writing a quick prog just to test by using the asset:: with a Sound.Load and the problem still persists.
Further investigation with another editor shows that the first 1024 bytes are not being played, but skipped
Mark can you share your thoughts on this?
I can post audio highlighting the issue if needed?
To Recap – Monkey2 ignores the first 1024 bits in any audio waveform (pitch not adjusted)
ok, update on this.
The sound is being loaded, so everything there is fine, but still not sounding right. Doing some tests I found the following:
- Sound is being loaded
- when played non looped sound plays, but sound quiet. but it is actually not playing the beginning!!
- when played looped, the sound plays (missing the beginning) then loops back to the correct start – the punchy load bit!
So it looks like when the sound plays it is missing a portion of the beginning – around 4096 bytes – which seems to be about the buffer size (off the top of my head)
I then tried augmenting the mojo audio code to force the playhead (AL_SAMPLE_OFFSET) to be at 0, but still missing the beginning.
But the 4096 thing make me think that the buffer is not being filled first time around. I’ll report more later.
Note this is a very short waveform (drum sound) so it is very apparent.
nice effect
very very high cpu usage though. 2 core 50% maxed on each.
quick update on this 2
replaced modules/std/collection/list.monkey2 with the V1.1.03 version, compiled std and everything works fine now.
yep. Didn’t like the space in the folder name. So now we know not to use spaces in folder names for Sierra
second bug was to do with hitting an alien
around line 777
Monkey123456If thisAlien.life <=0player1.score+=thisAlien.valuethisAlien.Destroy()Sfx.AlienDie.Play()Elsethe error is to do with lists in V1.0.91
I’ve just tried compiling in V1.1.03 and there is no bug. so it’s definitely monkey2 V1.0.91 that has the problem
the compiled file works fine with no issues.
I have a feeling I know what the problem is. I’m on Sierra and my thought is to do with the new file system. I’ll do some research and come back to you…
doesn’t run from ide on osx
runs from file
crash on pressing space to fire when missile hits alien
How are you approaching all of this? As I’ve got some stuff here that might help – sprite editor, map editor, etc
Don’t know if it will speed things up, but I would like to help?
https://adamstrange.itch.io/fontsprite
It’s all in monkey 2 so I can give you any needed code
Excellent news
field _tracks:Track[, ] = New Track[64, 8]
tried to do the fill using different methods, but none worked. best solution would be to use data and read it into the array?
Here’s a quick clip of working code for you:
Monkey123456789101112131415161718192021method Load( filePath:string )Print "loading..."If Not filePath Returnif ExtractExt( filePath ).ToLower() <> ".mx2map" Then ReturnLocal fStream:Stream = Stream.Open( filePath, "r" )If not fStream ThenPrint "XX "+filePath + " not opened"ReturnEnd Iflocal id:int = fStream.ReadInt()If id <> -9999 ThenPrint filePath + " ID error"fStream.Close()ReturnEnd If'do something elsefStream.Close()looks very nice. Good for you Mark
-
AuthorPosts