WAVE to you all
WAVE to you all
I needed something rather special to use to compose a funky tune for Impossible Mission. So i thought of Sonix but its just too limited by todays standards, i looked at AYT but its just too damn complex and rather unstable so i thought f~ck it, i'll just write a new editor. And its here, written within just one Month (October) and comes complete with two demo songs, a full Manual and all the facilities you expect from a Tracker.
It also fully supports EG as a hardware waveform generator and supports 10Khz Samples.
Not sure what to say dudes, i feel a tad jet lagged since i've just finished this new Music Editor, the final one i'll do on the Oric and it took just one month to write!
You can get it here
http://www.defence-force.org/ftp/forum/ ... e/wave.zip
Right, back to Impossible Mission music now and the eventual WAVE music compiler
It also fully supports EG as a hardware waveform generator and supports 10Khz Samples.
Not sure what to say dudes, i feel a tad jet lagged since i've just finished this new Music Editor, the final one i'll do on the Oric and it took just one month to write!
You can get it here
http://www.defence-force.org/ftp/forum/ ... e/wave.zip
Right, back to Impossible Mission music now and the eventual WAVE music compiler
Re: WAVE to you all
I bet it won'tTwilighte wrote:the final one i'll do on the Oric
Will have a look at it, for sure, as soon as I have some time. Mmmm... or maybe should I wait until you write the compiler?
Thanks Twilighte!
You should take this now. I am currently working on the compiler.
I'll need it for IM music afterall.
WAVE has been thoroughly tested and is quite robust now. There are a couple of outstanding issues which the manual details but i am very happy with its content. I may add SID sound at a future time and some more key commands to editors but this should not affect any music files you have since i have made sure there are some spare keys in the existing file.
One thing that Dbug mentioned that needs to be made very clear is that when you go to load music or the sample bank within the editor you must never include the extension because the program adds it itself.
Also patterns are formatted in such a way that you should only specify fields when they are required.
For example..
Will play C-4 with Effect 0 then wait then it will play C-0 without Effect.
Its quite logical in that respect
Also with EG..
Will set the triangle wave with a period of 30 then wait then changes just the period. If you specified the Wave again then it may sound wrong because it would force the program to write the waveform again which triggers the AY to begin the waveform again.
I'll need it for IM music afterall.
WAVE has been thoroughly tested and is quite robust now. There are a couple of outstanding issues which the manual details but i am very happy with its content. I may add SID sound at a future time and some more key commands to editors but this should not affect any music files you have since i have made sure there are some spare keys in the existing file.
One thing that Dbug mentioned that needs to be made very clear is that when you go to load music or the sample bank within the editor you must never include the extension because the program adds it itself.
Also patterns are formatted in such a way that you should only specify fields when they are required.
For example..
Code: Select all
C-4 F0---
RST -----
C-4 F----
Its quite logical in that respect
Also with EG..
Code: Select all
30T -
--- -
25- -
Guess I was too tired, tried your program at 1:40 this morning back from a Halloween party, guess that explains
I tried again today, and indeed it worked. I guess I fumbled somewhere due to the fact I have an azerty keyboard, that Euphoric layout was in qwerty, and that the files are called exAMple, which give ample opportunities to get it wrong when one is tired
That being said, I managed to load and play a file without reading the manual, says a lot about the usability compared to Sonix
I tried again today, and indeed it worked. I guess I fumbled somewhere due to the fact I have an azerty keyboard, that Euphoric layout was in qwerty, and that the files are called exAMple, which give ample opportunities to get it wrong when one is tired
That being said, I managed to load and play a file without reading the manual, says a lot about the usability compared to Sonix
Just finished the first version of the compiler.
The results (Music only, no samples) are..
EXAMPLE1 compiled to 3688 Bytes
EXAMPLE2 compiled to 4095 Bytes
I am not entirely happy with the compaction ratio since both these tunes are relatively small :/
Thought more today about this ratio and realise it can't be right. I know the first pattern is 50 bytes which is correct so if i double this to 100 and multiply by the 5 patterns of example2 thats still just 500 bytes. Put it with the list, effects, ornaments and tables and its still way under 1K.
So something is not quite correct. I'll investigate tonight.
However i will now write the player and Joiner (Attaches Samples to Music).
The results (Music only, no samples) are..
EXAMPLE1 compiled to 3688 Bytes
EXAMPLE2 compiled to 4095 Bytes
I am not entirely happy with the compaction ratio since both these tunes are relatively small :/
Thought more today about this ratio and realise it can't be right. I know the first pattern is 50 bytes which is correct so if i double this to 100 and multiply by the 5 patterns of example2 thats still just 500 bytes. Put it with the list, effects, ornaments and tables and its still way under 1K.
So something is not quite correct. I'll investigate tonight.
However i will now write the player and Joiner (Attaches Samples to Music).
ok, just spent much of the evening breaking the bug and finally fixed it.
Now..
Example1 compiles to 646 Bytes instead of 3688 Bytes
Example2 compiles to 1221 Bytes instead of 4095 Bytes
Much much better
Spent the rest of the evening working on the player. Got Patterns and List code written and have just started on Ornament processing.
Its looking like its gonna be a very compact player
Now..
Example1 compiles to 646 Bytes instead of 3688 Bytes
Example2 compiles to 1221 Bytes instead of 4095 Bytes
Much much better
Spent the rest of the evening working on the player. Got Patterns and List code written and have just started on Ornament processing.
Its looking like its gonna be a very compact player
Ok, NOW it works! at last.
Slight changes to compiling sizes.
Example 1 compiles to 606 Bytes
Example 2 compiles to 1181 Bytes
The Player is 1263 Bytes but with a few limitations at the moment.
1) It is limited to No Samples and runs at 50Hz Patching BASIC IRQ Vector.
2) It does not handle Pattern Commands so Tempo and Pitchbend are not supported.
Now i have to package it up to make it available as a utility to both BASIC and ASM(XA) users.
For ASM i need to write a utility that dumps the compiled music data to the printer (file). The ASM user can then pick up the xa compliant .byt statements together with the provided player source code and insert them into their own source.
The Player must be Page Alligned but the Music can be placed freely anywhere in RAM.
For BASIC users they will need separate versions for HIRES and TEXT because both player and music will sit below these screens.
The music routine (as it stands today) will patch BASIC IRQ and allow the music to play concurrently with BASIC (like the Sonix Compiler).
Like Sonix u can even do disk ops but expect a delay during play.
Slight changes to compiling sizes.
Example 1 compiles to 606 Bytes
Example 2 compiles to 1181 Bytes
The Player is 1263 Bytes but with a few limitations at the moment.
1) It is limited to No Samples and runs at 50Hz Patching BASIC IRQ Vector.
2) It does not handle Pattern Commands so Tempo and Pitchbend are not supported.
Now i have to package it up to make it available as a utility to both BASIC and ASM(XA) users.
For ASM i need to write a utility that dumps the compiled music data to the printer (file). The ASM user can then pick up the xa compliant .byt statements together with the provided player source code and insert them into their own source.
The Player must be Page Alligned but the Music can be placed freely anywhere in RAM.
For BASIC users they will need separate versions for HIRES and TEXT because both player and music will sit below these screens.
The music routine (as it stands today) will patch BASIC IRQ and allow the music to play concurrently with BASIC (like the Sonix Compiler).
Like Sonix u can even do disk ops but expect a delay during play.
GREAT Twilighte!Twilighte wrote:Ok, NOW it works! at last.
I plan to use it for music in 1337. I don't think I will include in-game music (maybe too much overhead for the poor 6502), but for transitions, or given screens.
What I want to add is a lot of sfx, but I was thinking about using SDES for that. Is that the correct approach?
All in all this is a big step forward in usability, and at last with a compiler
Thanks indeed!
If you need the compiler quickly i can provide it in a very basic form.
I can send you (or anyone who wants it) the Player code (must be page alligned) and the Compiler utility.
This compiles the music to $7700 then save it with the extension CWF to disk. You could then CSAVE the memory to Tape then use OSDK HEADER to remove tape header and finally BIN2XA to generate xa source file.
Since the music file contains all information about the music within and all pointers and tables are relative, you can put the music anywhere in memory.
A bit of a long way round but workable.
I can send you (or anyone who wants it) the Player code (must be page alligned) and the Compiler utility.
This compiles the music to $7700 then save it with the extension CWF to disk. You could then CSAVE the memory to Tape then use OSDK HEADER to remove tape header and finally BIN2XA to generate xa source file.
Since the music file contains all information about the music within and all pointers and tables are relative, you can put the music anywhere in memory.
A bit of a long way round but workable.
Well, your game is a little bit special in that any sfx must be extremely fast and not memory hungry so yes i would suggest SDES.Chema wrote:What I want to add is a lot of sfx, but I was thinking about using SDES for that. Is that the correct approach?
SDES can provide you some very simple SFX.
The compiler is almost ready. In fact it is finished but needs some beautifying and to be packaged up into a release.
I am aiming for a release this evening
Re: WAVE to you all
You can all now download the enhanced version of WAVE with music editor, compiler and full menu system here. Sources for xa player code also included.
http://www.defence-force.org/ftp/forum/ ... ave100.zip
And now some eye candy
The Main Wave Menu..
And the Music Editor..
The
Back to Impossible Mission music again
http://www.defence-force.org/ftp/forum/ ... ave100.zip
And now some eye candy
The Main Wave Menu..
And the Music Editor..
The
Back to Impossible Mission music again
The next version will definately contain Pitchbend. And a very special version of pitchbend using Linear Interpolation Between Semitones(LIBS).
AY pitch is log. For example the difference in pitch between C-5 to C#5 and C-2 to C#2 is different and by alot. 3 versus 27!
This may be demonstrated with a pitchbend from C-0 to C-7. As the pitch rising it gradually gains pace until towards the end it almost runs away.
However true percieved pitchbend should be linear, as in many of the SID tunes one may have heard on the Oric.
So instead of changing the pitch through steps and delays, we take the current semitone and the next semitone and work out the difference in pitch(ay register values). We then divide this down based on the Step set(using a series of 16bit shift rights) to get a value that is the step size between the semitones.
Step sizes may be from 0-7 where 0 is the smallest step size (128 Steps between semitones) and 7 is the largest step (1 Step equivalent to Glissando).
This may sound complex but in code it is actually quite easy to do and with no loop overhead so very little extra CPU.
I also hope to get SID working (alternative to Samples) in some form.
Just saved around 512 bytes so will work with that.
AY pitch is log. For example the difference in pitch between C-5 to C#5 and C-2 to C#2 is different and by alot. 3 versus 27!
This may be demonstrated with a pitchbend from C-0 to C-7. As the pitch rising it gradually gains pace until towards the end it almost runs away.
However true percieved pitchbend should be linear, as in many of the SID tunes one may have heard on the Oric.
So instead of changing the pitch through steps and delays, we take the current semitone and the next semitone and work out the difference in pitch(ay register values). We then divide this down based on the Step set(using a series of 16bit shift rights) to get a value that is the step size between the semitones.
Step sizes may be from 0-7 where 0 is the smallest step size (128 Steps between semitones) and 7 is the largest step (1 Step equivalent to Glissando).
This may sound complex but in code it is actually quite easy to do and with no loop overhead so very little extra CPU.
I also hope to get SID working (alternative to Samples) in some form.
Just saved around 512 bytes so will work with that.
The next version of Wave (with sid and pitchbend support) will change the way Samples are played.
Currently Samples occupy the high or low nibble of a byte so there are two banks, high and low bringing the size from the allocated 8K to 16K.
However this has its drawbacks. Firstly compiling a new song tries to keep things as small as possible but with high and low banks using potantially most of the space it can't be reduced.
So the next version alternates between banks high and low whilst playing.
The only current sample file provided will be updated to the new format.
Anyone already using the samples provided in version 0.2 should simply load the new sample file in after their music then save as normal.
Also the speed of samples is by default 5Khz instead of the current 10Khz.
Samples in the new version may also be set to a particular pitch (If the base sample frequency at 5Khz is C then you'll be able to play notes).
All this new sample stuff allows one to use samples for more than just percussion instruments but potentially sounds like bass guitars, etc.
Currently have new wave working and playing with new irq routine, but i've not tested the extra features yet.
Chema has already composed a tune for it, intending to use it in 1337. I hope others also start using it too.
Currently Samples occupy the high or low nibble of a byte so there are two banks, high and low bringing the size from the allocated 8K to 16K.
However this has its drawbacks. Firstly compiling a new song tries to keep things as small as possible but with high and low banks using potantially most of the space it can't be reduced.
So the next version alternates between banks high and low whilst playing.
The only current sample file provided will be updated to the new format.
Anyone already using the samples provided in version 0.2 should simply load the new sample file in after their music then save as normal.
Also the speed of samples is by default 5Khz instead of the current 10Khz.
Samples in the new version may also be set to a particular pitch (If the base sample frequency at 5Khz is C then you'll be able to play notes).
All this new sample stuff allows one to use samples for more than just percussion instruments but potentially sounds like bass guitars, etc.
Currently have new wave working and playing with new irq routine, but i've not tested the extra features yet.
Chema has already composed a tune for it, intending to use it in 1337. I hope others also start using it too.