]> git.alsa-project.org Git - alsa-gobject.git/commitdiff
seq: event_data_note: add accessor methods
authorTakashi Sakamoto <o-takashi@sakamocchi.jp>
Wed, 1 Apr 2020 09:13:28 +0000 (18:13 +0900)
committer坂本 貴史 <o-takashi@sakamocchi.jp>
Fri, 3 Apr 2020 13:06:25 +0000 (22:06 +0900)
Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
src/seq/alsaseq.map
src/seq/event-data-note.c
src/seq/event-data-note.h

index 28545778d4b3a6e8dc899b1085b3acd845a5aded..8764576ff75a1128af5a8ad682dbf12325275886 100644 (file)
@@ -78,6 +78,16 @@ ALSA_GOBJECT_0_0_0 {
     "alsaseq_event_data_result_set_result";
 
     "alsaseq_event_data_note_get_type";
+    "alsaseq_event_data_note_get_channel";
+    "alsaseq_event_data_note_set_channel";
+    "alsaseq_event_data_note_get_note";
+    "alsaseq_event_data_note_set_note";
+    "alsaseq_event_data_note_get_velocity";
+    "alsaseq_event_data_note_set_velocity";
+    "alsaseq_event_data_note_get_off_velocity";
+    "alsaseq_event_data_note_set_off_velocity";
+    "alsaseq_event_data_note_get_duration";
+    "alsaseq_event_data_note_set_duration";
   local:
     *;
 };
index 9eda77b4abe48295c5f01c907ef74152b16acff4..acf270da1b160e3e26a26196efe21adc06198e15 100644 (file)
@@ -7,3 +7,132 @@ ALSASeqEventDataNote *seq_event_data_note_copy(const ALSASeqEventDataNote *self)
 }
 
 G_DEFINE_BOXED_TYPE(ALSASeqEventDataNote, alsaseq_event_data_note, seq_event_data_note_copy, g_free)
+
+/**
+ * alsaseq_event_data_note_get_channel:
+ * @self: A #ALSASeqEventDataNote.
+ *
+ * Get the value of channel in the note event.
+ *
+ * Returns: the value of channel in the note event.
+ */
+guint8 alsaseq_event_data_note_get_channel(ALSASeqEventDataNote *self)
+{
+    return self->channel;
+}
+
+/**
+ * alsaseq_event_data_note_set_channel:
+ * @self: A #ALSASeqEventDataNote.
+ * @channel: The value of channel for the note event.
+ *
+ * Set the value of channel for the note event.
+ */
+void alsaseq_event_data_note_set_channel(ALSASeqEventDataNote *self,
+                                         guint8 channel)
+{
+    self->channel = channel;
+}
+
+/**
+ * alsaseq_event_data_note_get_note:
+ * @self: A #ALSASeqEventDataNote.
+ *
+ * Get the value of note in the note event.
+ *
+ * Returns: the value of note in the note event.
+ */
+guint8 alsaseq_event_data_note_get_note(ALSASeqEventDataNote *self)
+{
+    return self->note;
+}
+
+/**
+ * alsaseq_event_data_note_set_note:
+ * @self: A #ALSASeqEventDataNote.
+ * @note: The value of note for the note event.
+ *
+ * Set the value of note for the note event.
+ */
+void alsaseq_event_data_note_set_note(ALSASeqEventDataNote *self, guint8 note)
+{
+    self->note = note;
+}
+
+/**
+ * alsaseq_event_data_note_get_velocity:
+ * @self: A #ALSASeqEventDataNote.
+ *
+ * Get the value of velocity in the note event.
+ *
+ * Returns: the value of velocity in the note event.
+ */
+guint8 alsaseq_event_data_note_get_velocity(ALSASeqEventDataNote *self)
+{
+    return self->velocity;
+}
+
+/**
+ * alsaseq_event_data_note_set_velocity:
+ * @self: A #ALSASeqEventDataNote.
+ * @velocity: The value of note for the velocity event.
+ *
+ * Set the value of note for the velocity event.
+ */
+void alsaseq_event_data_note_set_velocity(ALSASeqEventDataNote *self,
+                                          guint8 velocity)
+{
+    self->velocity = velocity;
+}
+
+/**
+ * alsaseq_event_data_note_get_off_velocity:
+ * @self: A #ALSASeqEventDataNote.
+ *
+ * Get the value of off-velocity in the note event.
+ *
+ * Returns: the value of off-velocity in the note event.
+ */
+guint8 alsaseq_event_data_note_get_off_velocity(ALSASeqEventDataNote *self)
+{
+    return self->off_velocity;
+}
+
+/**
+ * alsaseq_event_data_note_set_off_velocity:
+ * @self: A #ALSASeqEventDataNote.
+ * @off_velocity: The value of note for the off-velocity event.
+ *
+ * Set the value of note for the off-velocity event.
+ */
+void alsaseq_event_data_note_set_off_velocity(ALSASeqEventDataNote *self,
+                                              guint8 off_velocity)
+{
+    self->off_velocity = off_velocity;
+}
+
+/**
+ * alsaseq_event_data_note_get_duration:
+ * @self: A #ALSASeqEventDataNote.
+ *
+ * Get the value of duration in the note event.
+ *
+ * Returns: the value of duratino in the note event.
+ */
+guint8 alsaseq_event_data_note_get_duration(ALSASeqEventDataNote *self)
+{
+    return self->duration;
+}
+
+/**
+ * alsaseq_event_data_note_set_duration:
+ * @self: A #ALSASeqEventDataNote.
+ * @duration: The value of duration for the note event.
+ *
+ * Set the value of duration for the note event.
+ */
+void alsaseq_event_data_note_set_duration(ALSASeqEventDataNote *self,
+                                          guint8 duration)
+{
+    self->duration = duration;
+}
index 32159ab4b8987cab812ed5f6b3c92429497d0ea0..cd21b04e5253fe0bf5aed1ca650fc4b8e57263ea 100644 (file)
@@ -15,6 +15,25 @@ typedef struct snd_seq_ev_note ALSASeqEventDataNote;
 
 GType alsaseq_event_data_note_get_type() G_GNUC_CONST;
 
+guint8 alsaseq_event_data_note_get_channel(ALSASeqEventDataNote *self);
+void alsaseq_event_data_note_set_channel(ALSASeqEventDataNote *self,
+                                         guint8 channel);
+
+guint8 alsaseq_event_data_note_get_note(ALSASeqEventDataNote *self);
+void alsaseq_event_data_note_set_note(ALSASeqEventDataNote *self, guint8 note);
+
+guint8 alsaseq_event_data_note_get_velocity(ALSASeqEventDataNote *self);
+void alsaseq_event_data_note_set_velocity(ALSASeqEventDataNote *self,
+                                          guint8 velocity);
+
+guint8 alsaseq_event_data_note_get_off_velocity(ALSASeqEventDataNote *self);
+void alsaseq_event_data_note_set_off_velocity(ALSASeqEventDataNote *self,
+                                              guint8 off_velocity);
+
+guint8 alsaseq_event_data_note_get_duration(ALSASeqEventDataNote *self);
+void alsaseq_event_data_note_set_duration(ALSASeqEventDataNote *self,
+                                          guint8 duration);
+
 G_END_DECLS
 
 #endif