You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If this layer doesn't exist in the file - because it's empty and doesn't need to be saved -, the export will fail with "list index out of range". This is a screenshot from Note Block Studio 3.10.0, which embeds nbswave 0.3.0:
This is not an issue most of the time because, as an implementation detail, Note Block Studio saves all loaded layers to the file, even if they are empty - incidentally, this means that every note block in the song is guaranteed to have a layer associated with it. However, as this is not required in the NBS specification, files saved with third-party tools may not have a layer entry for every layer with a note block, yet still load correctly in NBS.
A safeguard should be added when doing index checks so that the volume and panning attributes default to those of an empty layer.
NOTE: This is likely possible to happen in other indexed lookups as well, such as the note's instrument.
The text was updated successfully, but these errors were encountered:
This line tries to read the layer that a note is contained within:
https://github.com/Bentroen/nbswave/blob/40d97f640a3b0ee8f755d4111285f4a5b9adccc9/nbswave/nbs.py#L117
If this layer doesn't exist in the file - because it's empty and doesn't need to be saved -, the export will fail with "list index out of range". This is a screenshot from Note Block Studio 3.10.0, which embeds nbswave 0.3.0:
This is not an issue most of the time because, as an implementation detail, Note Block Studio saves all loaded layers to the file, even if they are empty - incidentally, this means that every note block in the song is guaranteed to have a layer associated with it. However, as this is not required in the NBS specification, files saved with third-party tools may not have a layer entry for every layer with a note block, yet still load correctly in NBS.
A safeguard should be added when doing index checks so that the volume and panning attributes default to those of an empty layer.
NOTE: This is likely possible to happen in other indexed lookups as well, such as the note's instrument.
The text was updated successfully, but these errors were encountered: