> On 02.04.2015, at 13:07, D. Michael McIntyre <[email protected]>
> wrote:
>
> On 04/01/2015 09:56 PM, Tom Breton (Tehom) wrote:
>
>> Now if I understand, you want this dialog (or editor) to stay open for
>> many commands. That seems to me more like the editors than the existing
>> dialogs.
>
> Thinking about it, the thing it seems most like is the MIDI mixer.
> That's a thing that can stay open as long as you want, that has a global
> scope, that changes things in real time that are reflected in other
> places, but it isn't really an editor as such. It's just a dialog with
> a bunch of buttons that do stuff. Buttons could issue commands.
> Commands could twiddle these parallel things.
>
> If it were me, I'd have a fresh look at the MIDI mixer, have a fresh
> think about what my parallels twiddler needs to do, and ask myself if I
> could just take a copy of the MIDI mixer, give this copy a new name,
> strip it down to the foundation, and start building on that.
Hi Tom&Michael,
thanks for all the help. In the end it turned out to be MUUUUCH easier than I
thought. I just missed that if you create a local variable of QSettings, this
refers to the overall QSettings without further need of communication (my
stupidity...).
I always wondered how TimeSignatureDialog::getTimeSignature() communicates the
settings back to the main system, as the corresponding code starts with
QSettings settings;
settings.beginGroup( GeneralOptionsConfigGroup );
settings.setValue("timesigdialogmakehidden",
m_hideSignatureButton->isChecked());
settings.setValue("timesigdialogmakehiddenbars",
m_hideBarsButton->isChecked());
and the local variable "settings" is never given back. But "settings" is not
really local (in the sense of content belonging to the current instance of
TimeSignatureDialog), the values are already in the rosegarden main settings.
So I just added something along these lines to my code and it works perfectly
well.
>
> I missed the LilyPond colored note question. I'm in too much of a hurry
> to skim back through the last few messages looking for it, but I might
> have been able to offer some insight.
>
It's about how to export colored notes, which I got working. Question is,
whether the solution is ok, or whether it might have unintended side effects as
I do not really understand the full logic of lilypond export. Here the
corresponding part of the mail:
I've looked around in the lilypond exporter. I do not really understand all the
issues, but it seems that LilyPondExporter::writePitch writes out the lilypond
representation of the current note to the current stream. I added a check
whether the note is member of a parallel to this. If yes, it prints out the
string "\tweak color #magenta" just before the note. This works for me in the
files that I checked. However, as I do not fully understand the logic, the
crucial question is, whether this may break something.
Code looks like this (for the moment I marked all my changes with "// AL"):
void
LilyPondExporter::writePitch(const Event *note,
const Rosegarden::Key &key,
std::ofstream &str)
{
// Note pitch (need name as well as octave)
// It is also possible to have "relative" pitches,
// but for simplicity we always use absolute pitch
// 60 is middle C, one unit is a half-step
long pitch = 60;
note->get
<Int>(PITCH, pitch);
Accidental accidental = Accidentals::NoAccidental;
note->get
<String>(ACCIDENTAL, accidental);
// format of LilyPond note is:
// name + octave + (duration) + text markup
// calculate note name and write note
std::string lilyNote;
lilyNote = convertPitchToLilyNote(pitch, accidental, key);
// AL
//
// handle parallel color
if (note->has(BaseProperties::MEMBER_OF_PARALLEL)) {
bool memberOfParallel;
note->get<Bool>(BaseProperties::MEMBER_OF_PARALLEL, memberOfParallel);
if (memberOfParallel) {
str << "\\tweak color #magenta ";
}
}
str << lilyNote;
}
So, would this be the correct way of marking the parallels in color? Or should
I go for something else?
Best
Armin
------------------------------------------------------------------------------
Dive into the World of Parallel Programming The Go Parallel Website, sponsored
by Intel and developed in partnership with Slashdot Media, is your hub for all
things parallel software development, from weekly thought leadership blogs to
news, videos, case studies, tutorials and more. Take a look and join the
conversation now. http://goparallel.sourceforge.net/
_______________________________________________
Rosegarden-devel mailing list
[email protected] - use the link below to unsubscribe
https://lists.sourceforge.net/lists/listinfo/rosegarden-devel