[tim-janik/beast] Port Song::loop_right, Song::tick_pointer (#68)

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

[tim-janik/beast] Port Song::loop_right, Song::tick_pointer (#68)

Gnome - Beast mailing list

2 more properties ported to C++


You can view, comment on, or merge this pull request online at:

  https://github.com/tim-janik/beast/pull/68

Commit Summary

  • BSE: Song::loop_right: port property to C++
  • BEAST-GTK: use C++ property Song::loop_right
  • BSE: Song::tick_pointer: port property to C++
  • BEAST-GTK: use C++ property Song::tick_pointer

File Changes

Patch Links:


You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub, or mute the thread.

<script type="application/json" data-scope="inboxmarkup">{"api_version":"1.0","publisher":{"api_key":"05dde50f1d1a384dd78767c55493e4bb","name":"GitHub"},"entity":{"external_key":"github/tim-janik/beast","title":"tim-janik/beast","subtitle":"GitHub repository","main_image_url":"https://assets-cdn.github.com/images/email/message_cards/header.png","avatar_image_url":"https://assets-cdn.github.com/images/email/message_cards/avatar.png","action":{"name":"Open in GitHub","url":"https://github.com/tim-janik/beast"}},"updates":{"snippets":[{"icon":"DESCRIPTION","message":"Port Song::loop_right, Song::tick_pointer (#68)"}],"action":{"name":"View Pull Request","url":"https://github.com/tim-janik/beast/pull/68"}}}</script> <script type="application/ld+json">[ { "@context": "http://schema.org", "@type": "EmailMessage", "potentialAction": { "@type": "ViewAction", "target": "https://github.com/tim-janik/beast/pull/68", "url": "https://github.com/tim-janik/beast/pull/68", "name": "View Pull Request" }, "description": "View this Pull Request on GitHub", "publisher": { "@type": "Organization", "name": "GitHub", "url": "https://github.com" } }, { "@type": "MessageCard", "@context": "http://schema.org/extensions", "hideOriginalBody": "false", "originator": "AF6C5A86-E920-430C-9C59-A73278B5EFEB", "title": "Port Song::loop_right, Song::tick_pointer (#68)", "sections": [ { "text": "", "activityTitle": "**Stefan Westerfeld**", "activityImage": "https://assets-cdn.github.com/images/email/message_cards/avatar.png", "activitySubtitle": "@swesterfeld", "facts": [ ] }, { "title": "Commit Summary", "facts": [ { "name": "4aa9647", "value": "BSE: Song::loop_right: port property to C++" }, { "name": "5283368", "value": "BEAST-GTK: use C++ property Song::loop_right" }, { "name": "1a6142b", "value": "BSE: Song::tick_pointer: port property to C++" }, { "name": "5de1c36", "value": "BEAST-GTK: use C++ property Song::tick_pointer" } ] }, { "title": "File Changes", "facts": [ { "name": "Modified", "value": "[beast-gtk/bsttrackrollctrl.cc](https://github.com/tim-janik/beast/pull/68/files#diff-0) (6 changes)" }, { "name": "Modified", "value": "[beast-gtk/bsttrackview.cc](https://github.com/tim-janik/beast/pull/68/files#diff-1) (11 changes)" }, { "name": "Modified", "value": "[bse/bseapi.idl](https://github.com/tim-janik/beast/pull/68/files#diff-2) (5 changes)" }, { "name": "Modified", "value": "[bse/bsesong.cc](https://github.com/tim-janik/beast/pull/68/files#diff-3) (116 changes)" }, { "name": "Modified", "value": "[bse/bsesong.hh](https://github.com/tim-janik/beast/pull/68/files#diff-4) (4 changes)" } ] } ], "potentialAction": [ { "name": "Add a comment", "@type": "ActionCard", "inputs": [ { "isMultiLine": true, "@type": "TextInput", "id": "IssueComment", "isRequired": false } ], "actions": [ { "name": "Comment", "@type": "HttpPOST", "target": "https://api.github.com", "body": "{\n\"commandName\": \"IssueComment\",\n\"repositoryFullName\": \"tim-janik/beast\",\n\"issueId\": 68,\n\"IssueComment\": \"{{IssueComment.value}}\"\n}" } ] }, { "name": "Close pull request", "@type": "HttpPOST", "target": "https://api.github.com", "body": "{\n\"commandName\": \"PullRequestClose\",\n\"repositoryFullName\": \"tim-janik/beast\",\n\"pullRequestId\": 68\n}" }, { "targets": [ { "os": "default", "uri": "https://github.com/tim-janik/beast/pull/68" } ], "@type": "OpenUri", "name": "View on GitHub" }, { "targets": [ { "os": "default", "uri": "https://github.com/tim-janik/beast/pull/68.patch" } ], "@type": "OpenUri", "name": "View patch" }, { "targets": [ { "os": "default", "uri": "https://github.com/tim-janik/beast/pull/68.diff" } ], "@type": "OpenUri", "name": "View diff" }, { "name": "Unsubscribe", "@type": "HttpPOST", "target": "https://api.github.com", "body": "{\n\"commandName\": \"MuteNotification\",\n\"threadId\": 372852334\n}" } ], "themeColor": "26292E" } ]</script>
_______________________________________________
beast mailing list
[hidden email]
https://mail.gnome.org/mailman/listinfo/beast
Reply | Threaded
Open this post in threaded view
|

Re: [tim-janik/beast] Port Song::loop_right, Song::tick_pointer (#68)

Gnome - Beast mailing list

@tim-janik commented on this pull request.

Thanks a lot, minor comments inline.


In bse/bsesong.cc:

> +
+void
+SongImpl::tick_pointer (int tick)
+{
+  BseSong *self = as<BseSong*>();
+
+  if (uint (tick) != self->tick_SL)
+    {
+      // this property has no undo
+
+      BSE_SEQUENCER_LOCK ();
+      self->tick_SL = tick;
+      for (SfiRing *ring = self->tracks_SL; ring; ring = sfi_ring_walk (ring, self->tracks_SL))
+        {
+          BseTrack *track = (BseTrack*) ring->data;
+          track->track_done_SL = FALSE;	/* let sequencer recheck if playing */

While you're at it, the C macros TRUE and FALSE should be converted to C++'s true and false.


In beast-gtk/bsttrackrollctrl.cc:

> @@ -565,7 +565,8 @@ pointer_move (BstTrackRollController *self,
       drag->type != GXK_DRAG_DONE) /* skip release events */
     {
       guint tick = bst_track_roll_controller_quantize (self, drag->current_tick);
-      bse_proxy_set (self->song, "tick-pointer", tick, NULL);
+      Bse::SongH song = Bse::SongH::down_cast (bse_server.from_proxy (self->song));

It might (soon) be time to convert self->song into a scoped handle. Please keep an eye on when it's easier or not too much effort to use a Bse::SongS in the track controller and go for it, so we can avoid all those from_proxy down casts.


You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub, or mute the thread.

<script type="application/json" data-scope="inboxmarkup">{"api_version":"1.0","publisher":{"api_key":"05dde50f1d1a384dd78767c55493e4bb","name":"GitHub"},"entity":{"external_key":"github/tim-janik/beast","title":"tim-janik/beast","subtitle":"GitHub repository","main_image_url":"https://assets-cdn.github.com/images/email/message_cards/header.png","avatar_image_url":"https://assets-cdn.github.com/images/email/message_cards/avatar.png","action":{"name":"Open in GitHub","url":"https://github.com/tim-janik/beast"}},"updates":{"snippets":[{"icon":"PERSON","message":"@tim-janik commented on #68"}],"action":{"name":"View Pull Request","url":"https://github.com/tim-janik/beast/pull/68#pullrequestreview-150049358"}}}</script> <script type="application/ld+json">[ { "@context": "http://schema.org", "@type": "EmailMessage", "potentialAction": { "@type": "ViewAction", "target": "https://github.com/tim-janik/beast/pull/68#pullrequestreview-150049358", "url": "https://github.com/tim-janik/beast/pull/68#pullrequestreview-150049358", "name": "View Pull Request" }, "description": "View this Pull Request on GitHub", "publisher": { "@type": "Organization", "name": "GitHub", "url": "https://github.com" } }, { "@type": "MessageCard", "@context": "http://schema.org/extensions", "hideOriginalBody": "false", "originator": "AF6C5A86-E920-430C-9C59-A73278B5EFEB", "title": "@tim-janik commented on 68", "sections": [ { "text": "Thanks a lot, minor comments inline.", "activityTitle": "**Tim Janik**", "activityImage": "https://assets-cdn.github.com/images/email/message_cards/avatar.png", "activitySubtitle": "@tim-janik", "facts": [ ] } ], "potentialAction": [ { "targets": [ { "os": "default", "uri": "https://github.com/tim-janik/beast/pull/68#pullrequestreview-150049358" } ], "@type": "OpenUri", "name": "View on GitHub" }, { "name": "Unsubscribe", "@type": "HttpPOST", "target": "https://api.github.com", "body": "{\n\"commandName\": \"MuteNotification\",\n\"threadId\": 372852334\n}" } ], "themeColor": "26292E" } ]</script>
_______________________________________________
beast mailing list
[hidden email]
https://mail.gnome.org/mailman/listinfo/beast
Reply | Threaded
Open this post in threaded view
|

Re: [tim-janik/beast] Port Song::loop_right, Song::tick_pointer (#68)

Gnome - Beast mailing list
In reply to this post by Gnome - Beast mailing list

Merged #68 into master.


You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub, or mute the thread.

<script type="application/json" data-scope="inboxmarkup">{"api_version":"1.0","publisher":{"api_key":"05dde50f1d1a384dd78767c55493e4bb","name":"GitHub"},"entity":{"external_key":"github/tim-janik/beast","title":"tim-janik/beast","subtitle":"GitHub repository","main_image_url":"https://assets-cdn.github.com/images/email/message_cards/header.png","avatar_image_url":"https://assets-cdn.github.com/images/email/message_cards/avatar.png","action":{"name":"Open in GitHub","url":"https://github.com/tim-janik/beast"}},"updates":{"snippets":[{"icon":"DESCRIPTION","message":"Merged #68 into master."}],"action":{"name":"View Pull Request","url":"https://github.com/tim-janik/beast/pull/68#event-1812662311"}}}</script> <script type="application/ld+json">[ { "@context": "http://schema.org", "@type": "EmailMessage", "potentialAction": { "@type": "ViewAction", "target": "https://github.com/tim-janik/beast/pull/68#event-1812662311", "url": "https://github.com/tim-janik/beast/pull/68#event-1812662311", "name": "View Pull Request" }, "description": "View this Pull Request on GitHub", "publisher": { "@type": "Organization", "name": "GitHub", "url": "https://github.com" } }, { "@type": "MessageCard", "@context": "http://schema.org/extensions", "hideOriginalBody": "false", "originator": "AF6C5A86-E920-430C-9C59-A73278B5EFEB", "title": "Re: [tim-janik/beast] Port Song::loop_right, Song::tick_pointer (#68)", "sections": [ { "text": "", "activityTitle": "**Tim Janik**", "activityImage": "https://assets-cdn.github.com/images/email/message_cards/avatar.png", "activitySubtitle": "@tim-janik", "facts": [ ] } ], "potentialAction": [ { "targets": [ { "os": "default", "uri": "https://github.com/tim-janik/beast/pull/68#event-1812662311" } ], "@type": "OpenUri", "name": "View on GitHub" }, { "name": "Unsubscribe", "@type": "HttpPOST", "target": "https://api.github.com", "body": "{\n\"commandName\": \"MuteNotification\",\n\"threadId\": 372852334\n}" } ], "themeColor": "26292E" } ]</script>
_______________________________________________
beast mailing list
[hidden email]
https://mail.gnome.org/mailman/listinfo/beast