Stopping sounds?

Discussion in 'Discussion and Q&A Archive' started by Selbi, May 24, 2009.

Thread Status:
Not open for further replies.
  1. Selbi

    Selbi The Euphonic Mess Member

    Joined:
    Jul 20, 2008
    Messages:
    2,429
    Location:
    Northern Germany
    As always, 3 points.


    Well, currently I'm making a peelout, and I'm actually finished. But I have this problem: The SPO charge sound doesn't stop if you release before you may use it (you know, the delay). Because I suck at music hacking, I have absolutly no idea. Can anybody help me?
     
  2. Tweaker

    Tweaker OI! MIRON! Member

    Joined:
    Aug 10, 2007
    Messages:
    324
    There's a sound effect in Sonic CD that exists solely for the purpose of stopping other active sound effects. Since you've assumedly ported over the peel-out sound effect, you should be able to port over this other one as well. If I remember right, it's directly after the peel-out sound effect, but I could be wrong.
     
  3. Selbi

    Selbi The Euphonic Mess Member

    Joined:
    Jul 20, 2008
    Messages:
    2,429
    Location:
    Northern Germany
    I haven't ported the Peelout. I just used a Spindash, changed the anims and added a delay, which means, I still have the Spindash sounds. No idea how the Sonic CD Peelout works.
     
    Last edited by a moderator: May 24, 2009
  4. nineko

    nineko I am the Holy Cat Member

    Joined:
    Mar 24, 2008
    Messages:
    1,902
    Location:
    italy
    Just create a new sound effect with the same channel layout of the spindash sound and blank data, and play it in case the Peel-Out is cancelled. It should technically work.
     
  5. Cinossu

    Cinossu A blend of secret herbs and spices Member

    Joined:
    Aug 14, 2007
    Messages:
    282
    Location:
    London, UK
    I actually made one for this exact purpose. Lemme grab it..



    Code:
    dc.b $00,$0F,$01,$01,$80,$04,$00,$0A,$00,$06,$EF,$00,$80,$01,$F2

    That's the entire sound effect. If it doesn't work, you see the "$80,$04"? Change the $04 to the right FM channel.


    EDIT: Oh, and that sound effect is for Sonic 1. You may have to edit some of the pointers in it for Sonic 2.
     
    Last edited by a moderator: May 25, 2009
  6. Hanoch

    Hanoch Well-Known Member Member

    Joined:
    Aug 3, 2008
    Messages:
    312
    Location:
    Israel
    You could just create a sound effect and put a $80 playing in the desired FM/PSG channels, thats what I had in mind when I was still creating the peelout.
     
  7. Selbi

    Selbi The Euphonic Mess Member

    Joined:
    Jul 20, 2008
    Messages:
    2,429
    Location:
    Northern Germany
    As I already said, I can't do any shit with music, because I'm kinda noobish there... Hopefully I will get it one day. Points to Cinossu and nineko.


    EDIT:

    And again, no music skills. I'm using the normal Spindash sounds (the one on SR). So could someone tell me what the correct FM channel is?
     
    Last edited by a moderator: May 25, 2009
  8. Cinossu

    Cinossu A blend of secret herbs and spices Member

    Joined:
    Aug 14, 2007
    Messages:
    282
    Location:
    London, UK
    That's exactly what the sound effect I posted does. :p

    I don't know this myself off by heart, so the best thing to do is trial and error. Set to $80,$00, check, doesn't work? $80,$01, check, doesn't work? $80,etc.


    Don't be afraid to alter things. The worst that can happen is that it doesn't work. The undo button is a good friend. :p
     
    Last edited by a moderator: May 25, 2009
  9. Selbi

    Selbi The Euphonic Mess Member

    Joined:
    Jul 20, 2008
    Messages:
    2,429
    Location:
    Northern Germany
    Ok, I tried it from $00 to $10, but without any luck. Maybe I made something wrong, because I'm a fool, but I'm not sure. Anyway, here is my exit code:



    SPO_End_NoDelay:
    move.w (SPO_StopSound).l,d0 ; "stop SPO charge" sound


    jsr (PlaySound_Special).w


    move.w #$60,($FFFFF73E).w ; reset looking up/down


    move.b #0,$1C(a0) ; change anim to standing again


    clr.b ($FFFFFEBA).w ; clear SPO flag


    moveq #0,d0 ; clear d0


    rts


    ; --------------------------------------------------------------------------------------------


    SPO_StopSound: dc.b $00, $0F, $01, $01, $80, $04, $00, $0A, $00, $06, $EF, $00, $80, $01, $F2


    even


    ; --------------------------------------------------------------------------------------------



    I bet 5 bux, that I made something creapy wrong.
     
  10. nineko

    nineko I am the Holy Cat Member

    Joined:
    Mar 24, 2008
    Messages:
    1,902
    Location:
    italy
    Yes, you're doing it really wrong. You have to add a new sound.


    Go to "SoundIndex:" and look up the first free SoundXX available, it should be probably be in the DX range (D2, I think). Add it to the SoundIndex in the same format as the other ones. Don't use D0, it's special.


    Look for the label to the last valid SoundXX in the sound index (e.g. "SoundD1:"), it should be an incbin in a long list of incbins.


    Add the label for the sound you just added (e.g. "SoundD2:"), followed by Cinossu's dc.b and the even.


    Change " move.w (SPO_StopSound).l,d0 ; "stop SPO charge" sound" with "move.b #$D2,d0 ; "stop SPO charge" sound". Done.
     
  11. Selbi

    Selbi The Euphonic Mess Member

    Joined:
    Jul 20, 2008
    Messages:
    2,429
    Location:
    Northern Germany
    5 was the correct channel. One day I will have to do the real sounds, but for now, this is Ok. Thanks to everyone, who was helping me in this topic, especially Cinossu and nineko. :)
     
Thread Status:
Not open for further replies.