Jump to content

Richi_S

Members
  • Content Count

    55
  • Joined

  • Last visited

Community Reputation

4 Neutral

About Richi_S

  • Rank
    Star Raider
  • Birthday 01/01/1981

Profile Information

  • Gender
    Male
  • Location
    Germany - Munich
  1. The song is about 1min 10 sec. long (please listen to the end so that you get all the effects and instruments). Demons Rev1.bin
  2. I was playing around with the original music and this is my first attempt... It uses 650 Bytes of ROM (Notes & instruments) 105 lines of Assembler instructions (squeezes into the Vsync area) and 9 bytes of RAM.
  3. Sorry, there is a problem with the Download.... "We could not find the attachment you were attempting to view." Can you retry uploading the file?
  4. Is a musical score or a midi file available?
  5. I had been using a simple Excel / Open Office spreadsheet to plan the timing and the jumps. I was permitted to upload the .ods and .xls file with their original filenames, so you will have to replace the .txt extension with .xls / .ods I'm sorry for the wrecked up formating of the file, nevertheless the content is still valid 2600timing_ods.txt 2600timing_xls.txt
  6. What about this move? I think a decent Terminator game is absolutely missing in the 2600 library. The movie came out 1984, a little after the videogame chrash. May be that explains it. (The ROM is best played with Z26) T2600.bin
  7. Session #9 Adding variable Music speed Variable music speed will give the game more appeal. Like speed up the music when the timer is almost up. By adding one byte of RAM to the sound system (now it is 10 bytes) you can control the music speed. The programm attached lets you slow down / speed up the music by pressing the left / right button of Joystick 0. Session #6 shows reasonable values for Music_timer_prescaler. Which parts of the code hve been changed... Line 41..42 and 118..121 Previously MUSIC_TIMER_PRESCALER was a simple constant, now it is a variable. Plus there are three constants to fill Music_timer_prescaler ;Music Speed Music_timer_prescaler ds 1 ;Song Timer prescaler: 5 -> 90 BPM @NTSC (with Note Base: 1/8) MUSIC_TIMER_PRESCALER_1 = #6 MUSIC_TIMER_PRESCALER_2 = #5 MUSIC_TIMER_PRESCALER_3 = #4 Line 201..203 Initialize music speed ;Initialize music speed LDA MUSIC_TIMER_PRESCALER_2 STA Music_timer_prescaler Line 300 CMP Music_timer_prescaler Changing the Music Speed: Line 503..529 It is save to change the music speed (Music_timer_prescaler) when Music_timer == #0, so you have to check if it is #0 before changing Music_timer_prescaler (just setting is to 0 won't help). If not done so the sound system will scramble up the music. Joystick0_check_Dpad ;Check Joystick Left pressed LDA SWCHA AND #$40 BNE Joystick0_Not_Left ;-- Joy 0 Left is pressed ;Check if the timer is Up (its safe to change the speed) LDA Music_timer CMP #0 BNE Joystick0_Not_Left ;-- Joy 0 Left is pressed and the Music_timer is up LDA MUSIC_TIMER_PRESCALER_1 STA Music_timer_prescaler Joystick0_Not_Left ;Check Joystick right pressed LDA SWCHA AND #$80 BNE Joystick0_Not_right ;-- Joy 0 Right is pressed ;Check if the timer is Up (its safe to change the speed) LDA Music_timer CMP #0 BNE Joystick0_Not_right ;-- Joy 0 Right is pressed and Music_timer is up LDA MUSIC_TIMER_PRESCALER_3 STA Music_timer_prescaler Joystick0_Not_right variable_BPM.bin variable_BPM.asm.txt
  8. Session #8 Muting the Stella Tracks. If You want to play your own sound on one of the two tracks, you can mute the Stella Tracks of my sound system separately. (In both examples you are able to mute the Tracks by pressing the Fire buttons). When muted you regain full control over the Registers AUDV0, AUDF0, AUDC0,AUDV1, AUDF1, AUDC1 Therefore the Music_control_register is used ;Music_control_register ;Bit 7 -> Mute Track 0 - Melodic Instrument(0-> Mute 1 ->100% Volume) ;Bit 6 ;Bit 5 -> Mute Track 1 - Percussion Instruments (0-> Mute 1 ->100% Volume) ;Bit 4 ;Bit 3 -> Release Control Mode (Don't change on your own, 0 -> Instrument 0 is in ADS Mode, 1 -> Instrument 0 is in release Mode) ;Bit 2 ;Bit 1 ;Bit 0 Since Bit 3 is used to control the Release mode of the Melodic instrument, you need to mask the Mute Bits 7 and 5. Also when chnging AUDC0 you need to restore it when unmuting the melodic instrument. Muting the melodic instrument LDA Music_control_register AND #$7F STA Music_control_register ;Needed If you want to just silence the track: LDA #0 STA AUDV0 Unmuting the melodic instrument LDA Music_control_register ORA #$80 STA Music_control_register ;Needed if you've changed AUDC0; Restore AUDC0: LDA MUSIC_INSTRUMENT0_AUDC STA AUDC0 Muting the percussion track LDA Music_control_register AND #$DF STA Music_control_register ;Needed If you want to just silence the track: LDA #0 STA AUDV1 Unmuting the percussion track LDA Music_control_register ORA #$20 STA Music_control_register
  9. Session #7 When designing music with this sound system I formulated these "rules of thumb": When making your songs, be aware of: The music will sound different from what you expect... It wil sound like Atari. What sounds funky on General midi sounds crummy on the 2600. The system is great as a beat box. You should start with a simple bassline. Use simple tunes for the melodic instrument Don't use too many differnt notes. 8 differnt notes per tune max. You should not convert music that thas notes < 1/16 To keep your music from getting boring / anoying place some drum loops or simple music pauses. Keep the melody as "somthing special" First use one of the generic instruments, design some beats, and then start to tune your instruents (specially the melodic instrument). When it sounds right you can go on finalizing the song. Start with one silent beat, to make sure that the emulator / TV has set up.
  10. Session #6 The Sound System allows you to design three different types of sequence 1. Loop One Song continiously. MUSIC_SONG_START = #0 MUSIC_SONG_LOOP_TO = #0 MUSIC_SONG_END = #37 2. Start with an intro, then loop the main theme continious MUSIC_SONG_START = #0 MUSIC_SONG_LOOP_TO = #20 MUSIC_SONG_END = #37 3. Play the Song once (then loop the last beat, which is silence) MUSIC_SONG_START = #0 MUSIC_SONG_LOOP_TO = #36 MUSIC_SONG_END = #37 The Music speed Following Table shows how the MUSIC_TIMER_PRESCALER is linked to the BPM. Lets assume that 8 notes form one Beat. Typically MUSIC_TIMER_PRESCALER is 4 to 7
  11. Session #5 You are free to design almost every Instrument you want to... This Session will give you a little guideline of what sounds good, and what doesn't. You can use session2_3.asm and exchange Lines 54 to 64 with the instrument code shown here. Every Instrument has got a Range, from which note to which note it sounds best. This Instrument could represent a electonic guitar, (Range: Note 7 to 15): MUSIC_INSTRUMENT0_AUDC = #7 ;Possible Instruments 4, 13,1,7,6, 15 with higher pitch MUSIC_INSTRUMENT0_SUSTAIN_END = #9 MUSIC_INSTRUMENT0_SUSTAIN_START = #5 MUSIC_INSTRUMENT0_END = #20 Music_instrument_AUDF0_table ; --- TV Frames ----> ; |<-ATTACK & Decay-> | |<- SUSTAIN -> | |<- RELEASE -> | END ; 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 .byte #0 ,#0 ,#0 ,#0 ,#0 ,#0 ,#0 ,#0 ,#0 ,#0 ,#0 ,#0 ,#0 ,#0 ,#0 ,#0 ,#0 ,#0 ,#0 ,#0 ,#0 Music_instrument_AUDV0_table .byte #10 ,#10 ,#8 ,#6 ,#6 ,#6 ,#6 ,#6 ,#6 ,#6 ,#6 ,#5 ,#4 ,#4 ,#3 ,#3 ,#2 ,#2 ,#2 ,#1 ,#0 Thats the same Instrument with a little bit more distorsion, (Range: Note 7 to 15): MUSIC_INSTRUMENT0_AUDC = #7 ;Possible Instruments 4, 13,1,7,6, 15 with higher pitch MUSIC_INSTRUMENT0_SUSTAIN_END = #9 MUSIC_INSTRUMENT0_SUSTAIN_START = #5 MUSIC_INSTRUMENT0_END = #20 Music_instrument_AUDF0_table ; --- TV Frames ----> ; |<-ATTACK & Decay-> | |<- SUSTAIN -> | |<- RELEASE -> | END ; 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 .byte #0 ,#0 ,#0 ,#0 ,#0 ,#0 ,#1 ,#0 ,#1 ,#0 ,#0 ,#1 ,#0 ,#1 ,#0 ,#1 ,#0 ,#1 ,#0 ,#0 ,#0 Music_instrument_AUDV0_table .byte #10 ,#10 ,#8 ,#6 ,#6 ,#6 ,#6 ,#6 ,#6 ,#6 ,#6 ,#5 ,#4 ,#4 ,#3 ,#3 ,#2 ,#2 ,#2 ,#1 ,#0 The Instrument from the current example: MUSIC_INSTRUMENT0_AUDC = #6 ;Possible Instruments 4, 13,1,7,6, 15 with higher pitch MUSIC_INSTRUMENT0_SUSTAIN_END = #9 MUSIC_INSTRUMENT0_SUSTAIN_START = #5 MUSIC_INSTRUMENT0_END = #20 Music_instrument_AUDF0_table ; --- TV Frames ----> ; |<-ATTACK & Decay-> | |<- SUSTAIN -> | |<- RELEASE -> | END ; 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 .byte #0 ,#0 ,#0 ,#0 ,#0 ,#0 ,#0 ,#0 ,#0 ,#0 ,#0 ,#0 ,#0 ,#0 ,#0 ,#0 ,#0 ,#0 ,#0 ,#0 ,#0 Music_instrument_AUDV0_table .byte #14 ,#14 ,#10 ,#8 ,#8 ,#8 ,#8 ,#8 ,#8 ,#8 ,#8 ,#7 ,#6 ,#5 ,#4 ,#3 ,#2 ,#2 ,#2 ,#1 ,#0 Another Instrument, one that uses "LFO" MUSIC_INSTRUMENT0_AUDC = #13 ;Possible Instruments 4, 13,1,7,6, 15 with higher pitch MUSIC_INSTRUMENT0_SUSTAIN_END = #9 MUSIC_INSTRUMENT0_SUSTAIN_START = #5 MUSIC_INSTRUMENT0_END = #20 Music_instrument_AUDF0_table ; --- TV Frames ----> ; |<-ATTACK & Decay-> | |<- SUSTAIN -> | |<- RELEASE -> | END ; 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 .byte #0 ,#-1 ,#-2 ,#-2 ,#-1 ,#0 ,#-1 ,#-2 ,#-2 ,#-1 ,#0 ,#-1 ,#-2 ,#-2 ,#-1 ,#0 ,#0 ,#0 ,#0 ,#0 ,#0 Music_instrument_AUDV0_table .byte #10 ,#10 ,#8 ,#6 ,#6 ,#6 ,#6 ,#6 ,#6 ,#6 ,#6 ,#5 ,#4 ,#4 ,#3 ,#3 ,#2 ,#2 ,#2 ,#1 ,#0 Some Siren like sound MUSIC_INSTRUMENT0_AUDC = #13 ;Possible Instruments 4, 13,1,7,6, 15 with higher pitch MUSIC_INSTRUMENT0_SUSTAIN_END = #9 MUSIC_INSTRUMENT0_SUSTAIN_START = #5 MUSIC_INSTRUMENT0_END = #20 Music_instrument_AUDF0_table ; --- TV Frames ----> ; |<-ATTACK & Decay-> | |<- SUSTAIN -> | |<- RELEASE -> | END ; 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 .byte #5 ,#4 ,#3 ,#2 ,#1 ,#0 ,#0 ,#0 ,#0 ,#0 ,#0 ,#0 ,#0 ,#0 ,#0 ,#0 ,#0 ,#0 ,#0 ,#0 ,#0 Music_instrument_AUDV0_table .byte #10 ,#10 ,#8 ,#6 ,#6 ,#6 ,#6 ,#6 ,#6 ,#6 ,#6 ,#5 ,#4 ,#4 ,#3 ,#3 ,#2 ,#2 ,#2 ,#1 ,#0 If not designed propperly the Melodic instrument will sound anoying. I suggest to consider following rules: The length of ATTACK & Decay and Release should be multiples of MUSIC_TIMER_PRESCALER. Simple ADSR Effects work best. Be carefull with "Modulized waveforms". You can't go wrong with Constant values in the Sustian phase. Do not write a 0 in the first Item of Music_instrument_AUDV0_table. The instrument will sound like a beginner playing the piano. Be carefull with Music_instrument_AUDF0_table. When overexceeding this tool the instrument will sound anoying. Epecially for instruments #6 and #7 A long Release Phase (>30 TV Frames & Enough pause notes) lead to an echo effect
  12. Session #4 In this session I'll show how to change the waveform of the melodic instrument. The melodic instrument is working - like most synthesizers and the C64 SID chip - with an ADSR envelope system. It can also change the instruments frequency, generatig some sort of LFO effects. http://en.wikipedia.org/wiki/ADSR_envelope http://en.wikipedia.org/wiki/Low-frequency_oscillation To some extend you can even modulate the waveform of the Volume/Frequency (Square, Sawtooth, ...) So, how does the sound system utilize these effects.... The relevant code from session2_3.asm: Lines 54 to 64: MUSIC_INSTRUMENT0_AUDC = #6 ;Possible Instruments 4, 13,1,7,6, 15 with higher pitch MUSIC_INSTRUMENT0_SUSTAIN_END = #9 MUSIC_INSTRUMENT0_SUSTAIN_START = #5 MUSIC_INSTRUMENT0_END = #20 Music_instrument_AUDF0_table ; --- TV Frames ----> ; |<-ATTACK & Decay-> | |<- SUSTAIN -> | |<- RELEASE -> | END ; 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 .byte #0 ,#0 ,#0 ,#0 ,#0 ,#0 ,#0 ,#0 ,#0 ,#0 ,#0 ,#0 ,#0 ,#0 ,#0 ,#0 ,#0 ,#0 ,#0 ,#0 ,#0 Music_instrument_AUDV0_table .byte #14 ,#14 ,#10 ,#8 ,#8 ,#8 ,#8 ,#8 ,#8 ,#8 ,#8 ,#7 ,#6 ,#5 ,#4 ,#3 ,#2 ,#2 ,#2 ,#1 ,#0 The theory goes line this: The AUDC0, AUDF0 and AUFV0 registers are changed every TV frame. Every "note"a new frequency is loaded (session #3). The AUDC0 register is fixed at MUSIC_INSTRUMENT0_AUDC, here it is #6. The AUDV0 register is loaded with the current value from Music_instrument_AUDV0_table The AUDF0 register ls loaded with the frequency to be played + the current value from Music_instrument_AUDV0_table So Music_instrument_AUDV0_table defines the envelope (Volume, Range 0 to 15) and Music_instrument_AUDF0_table defines the frequency shift (e.g. for LFOs, range -15 to +15, depending on the base frequency that shall be played). The pointer to the two tables is increased every TV frame, thus new values are loaded every TV frame, so "waveforms" are generated. The system has got four Phases: 1. Attack & Decay 2. Sustian 3. Release 4. End Lets play it through: 1. When a new Key is hit (a new frequency value shall be played) The Pointer starts at #0 (Attack & Decay). 2. The pointer is increased, until it reaches MUSIC_INSTRUMENT0_SUSTAIN_END. when it does so, the next note the pointer starts back at MUSIC_INSTRUMENT0_SUSTAIN_START (Sustain phase). 3a. This infinite loop is left when the key is released (a pause note has to be played), then the pointer is adding up until it reaches MUSIC_INSTRUMENT0_END (Release pahse, the preqiously played frequency is kept) . 4. When the pointer has reached MUSIC_INSTRUMENT0_END the values stored in that loation are applied to the AUDx0 regsiters, until a new note is loaded (end, silence). 3b. If the Instrument is in the Sustian phase and another KEy (a note, that is not pause) has to be played, the Pointer starts back at #0 (back to Attack & Decay). Now here comes an Example: Lets say MUSIC_TIMER_PRESCALER = 5 And the notes to be played: #10 #15 #15 #15 #99 #99 #04 We are using the values for the waveform from the code above. TV frame:__________ 00. 01. 02. 03. 04. 05. 06. 07. 08. 09. 10. 11. 12. 13. 14. 15. 16. 17. 18. 19. 20. 21. 22. 23. 24. 25. 26. 27. 28. 29. 30. 31. 32. 33. 34. Note to be played:_ #10 #10 #10 #10 #10 #15 #15 #15 #15 #15 #15 #15 #15 #15 #15 #15 #15 #15 #15 #15 #99 #99 #99 #99 #99 #99 #99 #99 #99 #99 #04 #04 #04 #04 #04 ... Pointer: __________ #00 #01 #02 #03 #04 #00 #01 #02 #03 #04 #05 #06 #07 #08 #09 #05 #06 #07 #08 #09 #10 #11 #12 #13 #14 #15 #16 #17 #18 #19 #00 #01 #02 #03 #04 ... AUDV0: ____________ #14 #14 #10 #08 #08 #14 #14 #10 #08 #08 #08 #08 #08 #08 #08 #08 #08 #08 #08 #08 #08 #07 #06 #05 #04 #03 #02 #02 #02 #01 #14 #14 #10 #08 #08 ... AUDF0:_____________ #10 #10 #10 #10 #10 #15 #15 #15 #15 #15 #15 #15 #15 #15 #15 #15 #15 #15 #15 #15 #15 #15 #15 #15 #15 #15 #15 #15 #15 #15 #04 #04 #04 #04 #04 ... And This is how it looks like: In the next Session I'm going to show some nice instruents that can be generated with his feature.
  13. This system really begs for a small composer programm, a feature to design the waveforms of the instruments, plus some generic percussion- and melodic instruments. It would be great for Visual bB.
×
×
  • Create New...