fletort
(fletort)
December 30, 2022, 9:26am
#1
Hello, i am trying to show the custom notes name defined in a midnam files in ardour.
It is not working.
This feature is old, from the 3.5.403 release note : “Support channel NoteNameLists in MIDNAM files”
It should gave me something as show on this website: drobilla.net : Ardour MIDI Patch, Controller, and Note Names . But in my side i have always the default note name.
Any idea ? IS this feature always supported ?
Regards,
fletort
(fletort)
January 3, 2023, 10:18am
#2
@drobilla : Hello, i am trying to find your commit that had this feature (in 2013).
Do you hava any idea about my post ?
Note: i found the commit: Support note names from midnam files (tested with the DM5). · Ardour/ardour@88de45b · GitHub
fletort
(fletort)
January 3, 2023, 3:18pm
#3
THe note list name seems parsed in the code and available as public :
class LIBMIDIPP_API Patch
{
public:
Patch (std::string a_name = std::string(), uint8_t a_number = 0, uint16_t bank_number = 0);
virtual ~Patch() {};
const std::string& name() const { return _name; }
void set_name(const std::string& name) { _name = name; }
const std::string& note_list_name() const { return _note_list_name; }
uint8_t program_number() const { return _id.program(); }
void set_program_number(uint8_t n) { _id.set_program(n); }
uint16_t bank_number() const { return _id.bank(); }
void set_bank_number (uint16_t n) { _id.set_bank(n); }
const PatchPrimaryKey& patch_primary_key() const { return _id; }
XMLNode& get_state () const;
But it does not seem to be use by the intrument.cc file.
It is normal behaviour ? It is a bug (i can help in this case).
All the relevant low-level code for that is indeed in midnam_patch.[h|cpp]
I have no idea what the user-visible status of that feature is now.
fletort
(fletort)
January 3, 2023, 4:52pm
#5
On my side i see always the default note name for my custom midnam test file but also for all instrument defined by default in ardour.
Maybe they are a bug here… as code seems always trying to manage that:
std::string
MidiRegionView::get_note_name (boost::shared_ptr<NoteType> n, uint8_t note_value) const
{
using namespace MIDI::Name;
std::string name;
MidiTimeAxisView* mtv = dynamic_cast<MidiTimeAxisView*>(&trackview);
if (mtv) {
MIDI::Name::PatchPrimaryKey patch_key;
get_patch_key_at (n->time(), n->channel(), patch_key);
name = instrument_info ().get_note_name (patch_key.bank(), patch_key.program(), n->channel(), note_value);
}
char buf[128];
snprintf (buf, sizeof (buf), "%s #%d\nCh %d Vel %d",
name.empty() ? ParameterDescriptor::midi_note_name (note_value).c_str() : name.c_str(),
(int) note_value,
(int) n->channel() + 1,
(int) n->velocity()); //we display velocity 0-based; velocity 0 is a 'note-off' so the user just sees values 1..127 which 'looks' 1-based
return buf;
system
(system)
closed
January 31, 2023, 4:52pm
#6
This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.