QuadCubedStudios / GoDAW

A Godot DAW
MIT License
101 stars 11 forks source link

Implement Polyphony for piano #35

Open IsotoxalDev opened 3 years ago

IsotoxalDev commented 3 years ago

Polyphony

The piano instrument as of now can only play one note at a time. It also stops all the music that is playing if stop_note is called on the piano instrument. Playing multiple notes at the same time is important

Technohacker commented 3 years ago

This may have to be instrument-specific, since certain instruments may be monophonic by design, or have a limited number of voices (pure chiptune)

IsotoxalDev commented 3 years ago

polyphony can be a variable in instrument. the value of polyphony will be the no. of notes that can be played at a time

razetime commented 3 years ago

if everything is polyphonic, then theres always the option of playing one note at a time. why have an unnecessary extra option?

Technohacker commented 3 years ago

I've added a method to the Instrument class to let the instrument take an AudioStreamPlayer, with defaults suited for GoDAW. This'll probably be enough, with the instrument deciding how to use those players to play notes

IsotoxalDev commented 3 years ago

if everything is polyphonic, then theres always the option of playing one note at a time. why have an unnecessary extra option?

because we want to cancel out a note if two notes are pressed. completely optional tho.

IsotoxalDev commented 3 years ago

I've added a method to the Instrument class to let the instrument take an AudioStreamPlayer, with defaults suited for GoDAW. This'll probably be enough, with the instrument deciding how to use those players to play notes

so polyphony has to be implemented by the instrument maker?

Technohacker commented 3 years ago

I've added a method to the Instrument class to let the instrument take an AudioStreamPlayer, with defaults suited for GoDAW. This'll probably be enough, with the instrument deciding how to use those players to play notes

so polyphony has to be implemented by the instrument maker?

Yup, and commit 3680c96 shows one example of this with TripleOsc

IsotoxalDev commented 3 years ago

Nice, Now can this issue be closed?

Technohacker commented 3 years ago

Not yet, I may need a convenience method for instrument-makers for later :)

IsotoxalDev commented 3 years ago

oh! okay

IsotoxalDev commented 2 years ago

So any update on this?