]> git.cworth.org Git - scherzo/log
scherzo
10 years agoAdd recognition of intervals.
Carl Worth [Tue, 17 Sep 2013 23:02:21 +0000 (16:02 -0700)]
Add recognition of intervals.

This is quite easy with the same machinery as the chord recognition.

10 years agoAdd recognition of 7th chords
Carl Worth [Tue, 17 Sep 2013 21:34:55 +0000 (14:34 -0700)]
Add recognition of 7th chords

There's still no recognition of chords in anything but root position,
(and the accidentals are still not yet drawn on the staff).

10 years agoAdd preliminary chord analysis
Carl Worth [Tue, 17 Sep 2013 21:17:37 +0000 (14:17 -0700)]
Add preliminary chord analysis

With this commit, challenges are disabled (for the moment), and
scherzo will analyze the notes pressed as a chord.

Currently, only the four basic types of triads (augemented, major,
minor, and dminished) are recognized, and these only in root position.

10 years agoFix the broken SCORE_PITCH_NAME macro to work correctly
Carl Worth [Tue, 17 Sep 2013 20:31:04 +0000 (13:31 -0700)]
Fix the broken SCORE_PITCH_NAME macro to work correctly

For no good reason, the score_pitch_name_t enum had previously been
defined with pre-shifted values. That could have worked, but the
SCORE_PITCH_NAME macro was shiftin the masked value down as if the
enum values were not pre-shifted. So SCORE_PITCH_NAME was yielding
unexpected values, (that did not correspond to score_pitch_name_t
enum values).

We fix this by making the enum sane, (with unshifted values), leaving
the shifting in place in SCORE_PIATCH_NAME and tracking the new style
of the enum by adding shifting to the SCORE_PITCH_VALUE macro.

That is, the macro that is changed by this commit reamins working, and
the macro that is left unchaged by this commit is now fixed.

10 years agoRename mnemon data file from "scherzo" to "scherzo-notes"
Carl Worth [Tue, 17 Sep 2013 19:23:56 +0000 (12:23 -0700)]
Rename mnemon data file from "scherzo" to "scherzo-notes"

This is in preparation for having "scherzo-chords" and others.

12 years agoUpdate sub-module path for menmon with a relative path.
Carl Worth [Tue, 10 Apr 2012 22:45:20 +0000 (15:45 -0700)]
Update sub-module path for menmon with a relative path.

This is an attempt to give people cloning scherzo a chance for it to
actually work.

12 years agoAdd ability to perform input with computer (not midi) keyboard.
Carl Worth [Wed, 28 Sep 2011 00:34:55 +0000 (17:34 -0700)]
Add ability to perform input with computer (not midi) keyboard.

This is useful for testing when away from a keyboard, and also useful
in its own right for ensuring that the user knows the names of the
notes (not just their position on the piano keyboard).

When using a computer keyboard for input only the note name itself is
needed---the correct octave is chosen automatically.

12 years agoAdd some color coding of input notes.
Carl Worth [Wed, 28 Sep 2011 00:12:39 +0000 (17:12 -0700)]
Add some color coding of input notes.

Red for an incorrect note, and green for correct. (The challenge notes
remain black.)

12 years agoShrink staves once ledger lines are no longer needed.
Carl Worth [Tue, 27 Sep 2011 04:58:45 +0000 (21:58 -0700)]
Shrink staves once ledger lines are no longer needed.

This is not extremely aggressive. It will only shrink once a staff has
no notes left.

12 years agoAdd correct sizing/spacing of staves and braces for ledger lines.
Carl Worth [Tue, 27 Sep 2011 04:45:43 +0000 (21:45 -0700)]
Add correct sizing/spacing of staves and braces for ledger lines.

At this point, we're ready to run quizzes for any white key on the
piano.

12 years agoDraw ledger lines.
Carl Worth [Tue, 27 Sep 2011 03:57:42 +0000 (20:57 -0700)]
Draw ledger lines.

It's almost getting to be a usable program now.

12 years agoDon't queue up as many widget redraws.
Carl Worth [Mon, 26 Sep 2011 17:36:09 +0000 (10:36 -0700)]
Don't queue up as many widget redraws.

For multiple MIDI messages in a single buffer, only queue a single redraw.

GTK+ should be coalescing these anyway, but we might as well not make
it work any harder than it has too.

12 years agoFix another bug with stuck notes.
Carl Worth [Mon, 26 Sep 2011 17:34:52 +0000 (10:34 -0700)]
Fix another bug with stuck notes.

When multiple MIDI messages were received in a single buffer, the code
was neglecting to advance the string pointer it was using to
parse. This was causing it to parse the first message several times
and ignore all following messages.

Fix this silly bug.

12 years agoFix bug with stuck notes when challenge would switch staves.
Carl Worth [Mon, 26 Sep 2011 16:42:20 +0000 (09:42 -0700)]
Fix bug with stuck notes when challenge would switch staves.

In this case we were failing to remove a note beacuse we were looking
at the new staff (where the new challenge is) rather than the old staff
where the note was originally created.

Fix this by having each note remember the staff it's created on. This
also impacts the API a bit (no longer need a staff argument to
remove_note, so drop the "_staff" portion of the name from both
add_note and remove_note).

12 years agoIntegrate some simple mnemon quizzing into scherzo.
Carl Worth [Mon, 26 Sep 2011 06:34:46 +0000 (23:34 -0700)]
Integrate some simple mnemon quizzing into scherzo.

This will be a lot more interesting once we start drawing ledger lines
and accidentals. But it's already useful for white-key practice for
the notes directly on the staff. Could definitely use better feedback
such as different colors (or even just different horizontal spacing
for challenge vs. response notes).

12 years agoAdd mnemon code as a git submodule
Carl Worth [Mon, 26 Sep 2011 00:54:06 +0000 (17:54 -0700)]
Add mnemon code as a git submodule

The scherzo code will be taking advantage of the mnemon code as if
it were a library of sorts.

12 years agoOpen MIDI device and display notes being played in real time.
Carl Worth [Sat, 24 Sep 2011 21:39:56 +0000 (14:39 -0700)]
Open MIDI device and display notes being played in real time.

Every time a key on the MIDI input device is pressed, a whole note appears
on the appropriate staff. When the key is released, the note disappears.

No ledger lines are drawn yet, and there appears to be a bug where notes
get stuck on (refusing to disappear after a key is released) triggered
most easily by pressing *many* keys simultaneously several times.

12 years agoIgnore the .deps directory.
Carl Worth [Fri, 23 Sep 2011 14:17:24 +0000 (07:17 -0700)]
Ignore the .deps directory.

This contains generated files only, nothing we want under revision control.

12 years agoStart drawing some very rudimentary notes.
Carl Worth [Fri, 23 Sep 2011 06:04:53 +0000 (23:04 -0700)]
Start drawing some very rudimentary notes.

I'm picking the correct (but hard-coded by glyph index) noteheads
out of the Gonville font. But I'm not drawing any stems nor flags
yet. Also the spacing between the notes isn't interesting yet, nor
do I have measure lines, nor ledger lines.

Oh, and the notes I added here for testing aren't even musically
interesting either. Anyway, we're still getting started obviously.

12 years agoMakefile: Fix automatic generation of dependencies.
Carl Worth [Fri, 23 Sep 2011 06:04:07 +0000 (23:04 -0700)]
Makefile: Fix automatic generation of dependencies.

Without this, updates to the header file were not triggering rebuilds
of the source. Things are much more convenient with this.

12 years agoRestructure code to manually add staves, braces, and notes.
Carl Worth [Fri, 23 Sep 2011 00:22:22 +0000 (17:22 -0700)]
Restructure code to manually add staves, braces, and notes.

Previously, the program was hard-coded to draw a grand staff, (two staves
connected by a brace). Now, at the level of the score library, each staff
and any braces are added manually and any set of staves and braces can be
drawn, (the only the two-staves-connected-by-one-brace has been tested).

There's also functionality for ading notes, though no notes are drawn yet.

12 years agoIncrease the default staff height just a bit.
Carl Worth [Sat, 17 Sep 2011 23:06:34 +0000 (16:06 -0700)]
Increase the default staff height just a bit.

At a height of 48, it's more comfortable to view, (while still having
a line_width of 1.0 for the staff lines).

12 years agoMake the brace and clef symbols scale with the staff.
Carl Worth [Sat, 17 Sep 2011 18:48:25 +0000 (11:48 -0700)]
Make the brace and clef symbols scale with the staff.

All looks much better now, (even if the size calculations are simply
empirically-derived linear fits to what looks good to me).

12 years agoAdd some scaling controls with plus/minus keybindings.
Carl Worth [Sat, 17 Sep 2011 16:17:42 +0000 (09:17 -0700)]
Add some scaling controls with plus/minus keybindings.

Total cheese in that the symbols (braces and clefs) don't change size yet,
but at least the line widths snap to nice integers.

12 years agoAdd some (particularly cheesy) drawing of a brace and clefs on the grand staff.
Carl Worth [Sat, 17 Sep 2011 15:55:09 +0000 (08:55 -0700)]
Add some (particularly cheesy) drawing of a brace and clefs on the grand staff.

This assumes the presence of the Gonville-26 and Gonville-Brace fonts, (by
Simon Tatham). Though it would be simple enough to change the code to use
any Lilypond-compatible font, (if the glyph selection were also update or
just fixed to lookup glyphs by name instead of hard-coding the index).

12 years agoDraw a second staff (and vertical lines at the beginning and end of staff).
Carl Worth [Sat, 17 Sep 2011 06:55:51 +0000 (23:55 -0700)]
Draw a second staff (and vertical lines at the beginning and end of staff).

This is almost the grand staff necessary for a piano score, (missing
the brace). The _draw_grand_staff function is a bit too specialized. A
more general approach will involve the ability to add an arbitrary
number of staffs (staves?) to the score, and selectively tie some
together (with or without a brace).

12 years agoStart drawing something
Carl Worth [Sat, 17 Sep 2011 03:41:17 +0000 (20:41 -0700)]
Start drawing something

So far, just a few simple staff lines.

12 years agoAdd a .gitignore file.
Carl Worth [Sat, 17 Sep 2011 03:40:53 +0000 (20:40 -0700)]
Add a .gitignore file.

12 years agoInitial commit of scherzo.
Carl Worth [Sat, 17 Sep 2011 03:08:49 +0000 (20:08 -0700)]
Initial commit of scherzo.

Nothing more than a simple GTK+ window so far.