Jump to content
IGNORED

IntyBASIC Music question


skywaffle

Recommended Posts

Hello,

I have been experimenting with consolidating music to two channels to leave room for sound effects. Initially I was planning to also reserve the noise channel for sound effects and remove all drums, however I recently was trying to add them back and use "Play Simple" instead of "Play Simple No Drums"

 

After doing this the percussion still does not play, despite being in the music statements. Any idea what I might be doing incorrectly?

 

Thank you,

Matthew

Link to comment
Share on other sites

Oh, I thought that Play Simple still supported drums. There is also a Play Simple No Drums command. I thought maybe leaving the third argument in the music statement as a dash and having the fourth argument as drums would still work for playing drums, while still keeping one sound channel available for sound effects.

I was previously using Play Full, however playing sound effects get cut off or sound choppy.

Link to comment
Share on other sites

While you're looking into that issue, can I make an obscure feature request: PLAY 1,2,3,4 or PLAY 1,2,0,4 or something like that, a choice to enable an individual voice instead of just simple or full with or without drums? Perhaps that would not be the best syntax but it could in rare cases come handy if you want to define the music data once but be able to only play one or two voices, with out without the noise drums mixed in.

  • Like 1
Link to comment
Share on other sites

You know, it's interesting about using the music channels and the sound commands together. In a project I'm working on, the music gets called first because there is no sound generation unless a collision between a sprite and something else occurs. When that happens, the sound is played, and one of the music channels is silenced for that moment. As soon as the sound is played and completed, the music picks right back up on that channel. I never reserved a music channel for that purpose. I kind of just pushed right through it. I am not an IntyBASIC expert by any means, so I can't explain the 0s and 1s of why this works ok or is bad practice. I can only share that I used all four channels, and soon all eight with ECS support, and when a sound command is called, it plays and then the music keeps going with all the channels intact.

 

It might be that IntyBASIC has just evolved to the point where it can now manage this easily. Either way, it's working for me in this single project instance. YMMV.

 

Hope this helps!

 

- Blaine

Link to comment
Share on other sites

Thank you for the response. I have played a bit with using 4 channels for music, and playing sound effects on a less overall used channel (or even one that was not used, but with "Play Full"), but for me, the sound effects and/or music becomes distorted during the sound playback.

 

I have tried moving my sound routines before and after the wait command just to see if it would help, but either way did not sound ideal. I was hoping that there may be a way to achieve something along the lines of sharing a channel with the music, but have not personally figured out a a way that sounded pleasing.

Link to comment
Share on other sites

Thank you for the response. I have played a bit with using 4 channels for music, and playing sound effects on a less overall used channel (or even one that was not used, but with "Play Full"), but for me, the sound effects and/or music becomes distorted during the sound playback.

 

I have tried moving my sound routines before and after the wait command just to see if it would help, but either way did not sound ideal. I was hoping that there may be a way to achieve something along the lines of sharing a channel with the music, but have not personally figured out a a way that sounded pleasing.

Ok, just solved.

 

The PLAY SIMPLE was treated always like PLAY SIMPLE NO DRUMS. It will be in next IntyBASIC update.

 

You can download the updated IntyBASIC prologue and epilogue files from Git https://github.com/nanochess/intybasic

  • Like 3
Link to comment
Share on other sites

Thank you for the response. I have played a bit with using 4 channels for music, and playing sound effects on a less overall used channel (or even one that was not used, but with "Play Full"), but for me, the sound effects and/or music becomes distorted during the sound playback.

 

I have tried moving my sound routines before and after the wait command just to see if it would help, but either way did not sound ideal. I was hoping that there may be a way to achieve something along the lines of sharing a channel with the music, but have not personally figured out a a way that sounded pleasing.

 

The problem is that if you play a sound effect while the music is playing on the same channel, you may change the channel's configuration inadvertently, affecting the music player.

 

For the purpose of optimizing the music player, it typically only configures the channels envelope and noise registers once at the beginning of the song, and then only updates volume and tone during playback. As you may imagine, if a sound effect changes this configuration, say, by enabling noise on the channel, then the music player will continue as normal and leave the noise, causing distortion.

 

Solving this is complicated and requires expensive processing, so it is common to just avoid the entire problem by dedicating at least one channel to sound effects.

 

I do not know if nanochess is able or willing to add something to the compiler or runtime to overcome this issue.

 

-dZ.

Link to comment
Share on other sites

I have only dedicated the third sound channel (sound 2) to sound effects, and tried to just get away from using the noise channel and keeping it reserved for percussion. I had been rewriting all the music to utilize only two channels, while keeping the drums. Honestly just using "play simple" works well enough in most cases, especially now that the drums work in conjunction. Logic to disable channels of the music is overkill.. I already have enough CPU cycles being eaten with various game logic. Nevertheless, I am always impressed to see what the Intellivision can do.

  • Like 1
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...