Log In  

Cart #picotuner-1 | 2022-11-21 | Code ▽ | Embed ▽ | No License
7

A cart I wrote to experiment with the 0x808 serial port. Arrow keys adjust the frequency and volume of the sin wav being written to the port. A graph of the samples written each frame is displayed to the screen.

Revision 1:
Added some enhancements:
Added several waveforms besides sine which can be cycled using 🅾️❎
Tuned to C4 = 256 Hz rather than A4 = 440 Hz to have a nice 12 cycles per frame synced initially
Updated graph to distinguish between points and the lines between them and added a zero line
Displaying the min and max of current waveform (useful for testing that new waveforms stay in range)

P#121097 2022-11-21 07:31 ( Edited 2022-11-21 17:47)

Interesting, @mattu82. Reminds me of the oscilloscope my Dad showed me as a youth.

Is there a way to remove the clicking though ?

P#121114 2022-11-21 18:05

@dw817 Try running this in native pico-8 ( > load #picotuner ) and see if you get as much clicking. I am not sure how browsers handle audio, but I suspect there is some audio processing tomfoolery behind the scenes causing this. I've noticed I get some pops and clicks in other carts too when I'm using a browser, and carts using the 0x0808 port seem especially affected. I just checked this out with Zep's #aajibi cart and it sounds a lot cleaner in native pico-8 then it does on the BBS.

P#121117 2022-11-21 18:46

Ah ! That seems to have fixed it, @mattu82. Hmm ... You know I don't remember Pico-8 having so many online problems in previous versions.

There may be something to learn from this.

In any case your program is working perfectly, no clicking, when run offline. And that deserves a gold star in itself.

Something you might also consider is adding the new flags of noiz buzz detune reverb and dampen

P#121120 2022-11-21 19:09 ( Edited 2022-11-21 19:12)

[Please log in to post a comment]

Follow Lexaloffle:          
Generated 2023-02-03 03:44:25 | 0.038s | Q:21