Closed xavierfav closed 6 years ago
Should we leave a message to the user warning him that the track should have different name ? Or can this be done in the issue 6 with the UI improvement ?
Yes we should do it here
The PR #13 prevents adding a track with the same name of another. However, there is no feedback to the user telling him that he should choose another name.
I also think the system should automatically assign a new name, and allow to rename the tracks.
I also think using the name as identifier is not a good practice. We should use an id for selecting and managing them. The sequencer state could maybe store the list of track names, and use indexes to describe them, something like this:
state =
{
trackNames: ['kick', 'snare'],
trackPads: {
'0': [<list of activated pads>],
'1': [<list of activated pads>]
},
trackSounds: {
'0': <soundUrl>,
'1': <soundUrl>
},
trackWaves: {
'0': [<startTime>, <endTime>],
'1': [<startTime>, <endTime>]
}
}
Adding tracks with same names is no longer a problem thanks to #23.
As explained in #4, when a track is added with the same name as another, the sequencer behaves in a strange way.
Whenever we create a track, we should check that the name is not already used.