Click here to Skip to main content
15,883,852 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
create a step sequencer program. So there should be a note class and a step class. The step class should draw the note class, assigning it its frequency and triOsc.

Make a new class Step which will handle a column of Notes. It will have as variables an array of Note objects, as well as a variable for whether or not it is the current step. The constructor will have as parameters the number of Notes, an array of the desired note frequencies, and position/width/height for the column. These will be used to construct the Note array as well as the Notes within it. Step should have a display() method which draws the Note boxes via their display() methods. It should also draw an indicator as to whether or not it is the current step. Step should have a play() method which loops through the Note play() methods. For testing, you may use the following list of A major scale frequencies: 220, 246.94, 261.63, 293.66, 329.63, 349.23, 392.00, 440.00.

What I have tried:

I have tried to set up the step and note class but I don't know how to create a triOsc array and tie that to the frequency of the note
Posted
Updated 11-Apr-22 2:06am
v2

1 solution

I had to do a net search to see what triOsc was, and I found this[^], so I updated your question to add a Java tag.

You have shown no code at all. It's unlikely that anyone will help you, because we get "Please write this code for me" questions all the time. The challenge sketches out a high-level design, so start from there. If you have no idea what to do, then start with easier challenges.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900