Jan-07-2020, 08:39 PM
(This post was last modified: Jan-07-2020, 08:39 PM by QuarterMissiv.)
Could anyone recommend where I could learn how to code and play a sound in Python.
For example, a variable holds a number. When run, that number is passed to an audio generator that plays a sound using the variable's value for pitch and then the code finishes. Maybe two variables could be used, one for pitch and another for duration.
Another example. There is an array of 10 integers. A loop moves through the array and the values are sent to the audio generator at each iteration of the loop. The code then finishes at the completion of the loop.
Maybe a clearer way to explain what I am thinking is to take a MIDI file as the input and pass its data to a player object that converts the MIDI data into pitch and duration.
But rather than using the data from the MIDI file, I want to use arrays and iteration in Python code as data to pass to the player object.
For example, a variable holds a number. When run, that number is passed to an audio generator that plays a sound using the variable's value for pitch and then the code finishes. Maybe two variables could be used, one for pitch and another for duration.
Another example. There is an array of 10 integers. A loop moves through the array and the values are sent to the audio generator at each iteration of the loop. The code then finishes at the completion of the loop.
Maybe a clearer way to explain what I am thinking is to take a MIDI file as the input and pass its data to a player object that converts the MIDI data into pitch and duration.
But rather than using the data from the MIDI file, I want to use arrays and iteration in Python code as data to pass to the player object.