Currently, Muse2pokecrystal will simply throw an error if any chords exist in the same channel.
There are a couple alternative ways to handle this:
Algorithm 1: Ignore all notes that have the <chord/> element
Pros:
Easy to implement
Cons:
Only the bottom notes of a chord lack the <chord/> element
This may not sound pleasing
May result in redundant notes depending upon input
Probably will delete the melody in most songs
Just not as cool
Algorithm 2: Ignore all notes that aren't the melody
Pros:
Sounds exactly as intended in many cases
Not too complex an algorithm
Ideal for channel 2
Cons:
Doesn't work as well for channels 1, 3, and 4
Poor option for chords that are purely meant to harmonize
Algorithm 3: Randomly choose a note from the chord
Two different modes:
One that excludes the top notes (user says it's the melody)
One that includes the entire chord (all harmony)
Pros:
More variety in songs
May work well for channels 1 and 3 (maybe 4?)
Generally cool concept
Cons:
Doesn't always produce desirable result due to being, well, random
Seeds will need to be saved if the output is to be reproduced (probably to a temporary file by default)
Relatively complex
Algorithm 4: Intelligent selection (Spanning across channels)
Explanation:
Note: I really dislike the idea of having to parse something spoopy like this. What will likely happen instead is there will still be a placeholder command and a separate chord list (at this point, likely a three dimensional one which is...not ideal) and an index that points to the placeholder.
Pre-process the notes and commands adding placeholders for notes formatted like so:
[[[list_index], [note, octave, length, tie_start_or_end], [note, octave, length, tie_start_or_end], ...], ...]
For example:
[[[4], ['A_', 4, 4, None], ['F#', 5, 8, 'start'], ...], ...]
Apply algorithm 2 for channel 2 only.
Apply algorithm 3 with weights based on what other notes exist in other channels. Prioritize unique notes.
Apply algorithm 1 to channel 4. Don't use too many different seeds.
Pros:
It can take a lot of junk and output something decent
Balanced and ideal mix of algorithms
Handles every channel
Cons:
This thing is likely a hefty amount of complex code.
Difficult to understand and implement correctly
Three dimensional lists are realllly gross if supported at all (possible to work around)
Simple version of algorithm 4 without the wacky list.
Pros:
Fairly resilient
Still pretty balanced
Per channel handling
Cons:
Still a fairly complex algorithm
Harder to weight values
I will try and see if I can implement an algorithm similar to algorithm 5. Ideally, the functionality of 4 should still be the target but it's a lot of work for very little gain.
Currently, Muse2pokecrystal will simply throw an error if any chords exist in the same channel. There are a couple alternative ways to handle this:
Algorithm 1: Ignore all notes that have the
<chord/>
elementPros:
Cons:
<chord/>
elementAlgorithm 2: Ignore all notes that aren't the melody
Pros:
Cons:
Algorithm 3: Randomly choose a note from the chord
Two different modes:
Pros:
Cons:
Algorithm 4: Intelligent selection (Spanning across channels)
Explanation:
Note: I really dislike the idea of having to parse something spoopy like this. What will likely happen instead is there will still be a placeholder command and a separate chord list (at this point, likely a three dimensional one which is...not ideal) and an index that points to the placeholder. Pre-process the notes and commands adding placeholders for notes formatted like so:
[[[list_index], [note, octave, length, tie_start_or_end], [note, octave, length, tie_start_or_end], ...], ...]
For example:[[[4], ['A_', 4, 4, None], ['F#', 5, 8, 'start'], ...], ...]
Apply algorithm 2 for channel 2 only. Apply algorithm 3 with weights based on what other notes exist in other channels. Prioritize unique notes. Apply algorithm 1 to channel 4. Don't use too many different seeds.Pros:
Cons:
Algorithm 5: Intelligent selection (single channel)
Simple version of algorithm 4 without the wacky list.
Pros:
Cons:
I will try and see if I can implement an algorithm similar to algorithm 5. Ideally, the functionality of 4 should still be the target but it's a lot of work for very little gain.