nebula_dev
nebula_dev
CC#
Created by nebula_dev on 3/31/2023 in #help
❔ BPM Clock System
I am in the process of making a program similar to SonicPI, in which will allow me to programmatically make music. I have made the sound and file reading logic, but I am stuck on figuring out how to manage the playback timing (BPM): If the user inputs this, and the BPM is 120: thread () { loop (4) { play(piano.wav, C4, 1); } } thread () { loop (4) { play(click.wav, C4, 2); } } It should play a piano note every beat, and a click sound every second beat. I was originally using Thread.Sleep and a few calculations, but it is very out of sync when threads are brought into the mix. Any help would be brilliant 😄
6 replies
CC#
Created by nebula_dev on 9/1/2022 in #help
Capturing keystroke signals
Hiya, I am looking for a way to catch the SIGTSTP signal triggered by CTRL+Z in a net6.0 console application. I can catch CTRL+C with Console.CancelKeyPress, but CTRL+Z and CTRL+\ I am unsure.
1 replies