Log In  

Basic, easy to use sound/music support is nice, but I'd love access to sound "hardware". Think of it like playing music/sound on your C64 using a mod player vs. writing a program to drive SID directly. This would give us many awesome possibilities that are either impossible or very hard to achieve with the sound system that is in Pico-8. I mean, we can access rendering hardware directly, so why not do the same for sounds?

All it would take is to add following command (name may be different, but gist about the same)

asnd waveform,freq,vol,channel

(asnd from advanced sound). It'll play waveform with specific frequency and volume (if either set to 0, it'd just stop playing it) on channel until another "regular" sound is played on that channel, either via music player or via sound command) or another asnd command is issued with that channel name. If channel is omitted, it'll play on first unused channel (with nothing playing on it).

As for waveforms, they're pretty much the same you can set in the sound editor.

P#40993 2017-05-26 09:02 ( Edited 2017-11-24 08:27)

I second this. It would then be easy to do things like siren sounds programmatically (and they could be dynamic).

P#46615 2017-11-23 05:07 ( Edited 2017-11-23 10:07)

I would LOVE for this to happen.

P#46642 2017-11-23 18:47 ( Edited 2017-11-23 23:47)


P#46648 2017-11-24 01:51 ( Edited 2017-11-24 06:51)

Yeah, that would be nice.

P#46652 2017-11-24 03:27 ( Edited 2017-11-24 08:27)

Found this old post and think the request is still useful :-)

P#65595 2019-07-05 11:54

This can be done without much trouble, actually. You just need to create instruments using poke():

  local state={}
  function play(form,freq,vol,ch)
    local id=state[ch]
    if not id then
      for k,v in pairs(state) do
        if v==id then state[k]=nil end
    local n=63-id
    local p=0x3200+68*n

Here is an example of how to use it:

function _update60()
  play(0,50+10*sin(a),5,"wave 1")
P#65696 2019-07-08 08:31

Perfect! (I was already doing tests with code quite similar to this! :-) )

P#65699 2019-07-08 13:31

Wow. May I use your code, Sam?

P#65709 2019-07-08 21:28

Sure, it’s all free to use and modify.

P#65736 2019-07-10 07:57

[Please log in to post a comment]

Follow Lexaloffle:          
Generated 2023-02-09 00:18:18 | 0.007s | Q:24