{"id":2242,"date":"2020-12-20T11:15:28","date_gmt":"2020-12-20T05:45:28","guid":{"rendered":"https:\/\/www.rangakrish.com\/?p=2242"},"modified":"2020-12-20T14:01:07","modified_gmt":"2020-12-20T08:31:07","slug":"jfugue-a-java-library-for-music-synthesis","status":"publish","type":"post","link":"https:\/\/www.rangakrish.com\/index.php\/2020\/12\/20\/jfugue-a-java-library-for-music-synthesis\/","title":{"rendered":"JFugue: A Java Library for Music Synthesis"},"content":{"rendered":"<p><a href=\"http:\/\/www.jfugue.org\" target=\"_blank\" rel=\"noopener noreferrer\"><em><strong>JFugue<\/strong><\/em><\/a>\u00a0is an open-source Java library that can be used for algorithmic music composition. Developed by David Koelle, currently it is in its fifth major version. You can get the library from <a href=\"http:\/\/www.jfugue.org\/download.html\" target=\"_blank\" rel=\"noopener noreferrer\"><em><strong>here<\/strong><\/em><\/a>.<\/p>\n<p>I had downloaded the library some time ago, but could not spend much time since my primary focus has been on <a href=\"https:\/\/opusmodus.com\" target=\"_blank\" rel=\"noopener noreferrer\"><em><strong>Opusmodus<\/strong><\/em><\/a>. This week I took some time off to get started with the library.<\/p>\n<p>I had two things on my mind when I started working with <em><strong>JFugue<\/strong><\/em>:<\/p>\n<ul>\n<li>Understand the capabilities of the library<\/li>\n<li>Explore the option of using it from <em><strong>Lisp<\/strong><\/em>, specifically <a href=\"http:\/\/www.lispworks.com\/products\/lispworks.html\" target=\"_blank\" rel=\"noopener noreferrer\"><em><strong>LispWorks<\/strong><\/em><\/a> Common Lisp<\/li>\n<\/ul>\n<p>The author\u2019s e-book is highly recommended in order to get a deeper understanding of the capabilities of the library. I am still going through the book while exploring the different features in a phased manner.<\/p>\n<p>Just like we have the <em><strong>OMN<\/strong><\/em> in <em><strong>Opusmodus<\/strong><\/em>, <em><strong>JFugue<\/strong><\/em> uses <em><strong>\u201cStaccato\u201d<\/strong><\/em>, a string-based music representation format that is quite expressive. Just to get started with the library, I wrote a simple Java program shown below:<\/p>\n<figure id=\"attachment_2253\" aria-describedby=\"caption-attachment-2253\" style=\"width: 600px\" class=\"wp-caption aligncenter\"><a href=\"https:\/\/i0.wp.com\/www.rangakrish.com\/wp-content\/uploads\/2020\/12\/java-2.jpg?ssl=1\"><img data-recalc-dims=\"1\" fetchpriority=\"high\" decoding=\"async\" data-attachment-id=\"2253\" data-permalink=\"https:\/\/www.rangakrish.com\/index.php\/2020\/12\/20\/jfugue-a-java-library-for-music-synthesis\/java-3\/\" data-orig-file=\"https:\/\/www.rangakrish.com\/wp-content\/uploads\/2020\/12\/java-2.jpg\" data-orig-size=\"924,436\" data-comments-opened=\"1\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;Admin&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;1608472711&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}\" data-image-title=\"Simple Java Program\" data-image-description=\"&lt;p&gt;Simple Java Program&lt;\/p&gt;\n\" data-image-caption=\"&lt;p&gt;Simple Java Program&lt;\/p&gt;\n\" data-large-file=\"https:\/\/www.rangakrish.com\/wp-content\/uploads\/2020\/12\/java-2.jpg\" class=\"wp-image-2253\" src=\"https:\/\/i0.wp.com\/www.rangakrish.com\/wp-content\/uploads\/2020\/12\/java-2.jpg?resize=600%2C283&#038;ssl=1\" alt=\"Simple Java Program\" width=\"600\" height=\"283\" srcset=\"https:\/\/i0.wp.com\/www.rangakrish.com\/wp-content\/uploads\/2020\/12\/java-2.jpg?resize=300%2C142&amp;ssl=1 300w, https:\/\/i0.wp.com\/www.rangakrish.com\/wp-content\/uploads\/2020\/12\/java-2.jpg?resize=768%2C362&amp;ssl=1 768w, https:\/\/i0.wp.com\/www.rangakrish.com\/wp-content\/uploads\/2020\/12\/java-2.jpg?w=924&amp;ssl=1 924w\" sizes=\"(max-width: 600px) 100vw, 600px\" \/><\/a><figcaption id=\"caption-attachment-2253\" class=\"wp-caption-text\"><strong>Simple Java Program<\/strong><\/figcaption><\/figure>\n<p>A brief description of the above program is in order. First, we create a <em><strong>\u201cPlayer\u201d<\/strong><\/em> object. The next statement uses a <em><strong>\u201cStaccato\u201d<\/strong><\/em> representation of a simple musical fragment, giving it to the player to play it. The token <em><strong>\u201cD3h\u201d<\/strong><\/em> denotes pitch <em><strong>\u201cD\u201d<\/strong><\/em>, 3rd <em><strong>octave<\/strong><\/em>, played for <em><strong>\u201chalf\u201d<\/strong><\/em> a note. <em><strong>\u201cBb3h\u201d<\/strong><\/em> denotes the pitch <em><strong>\u201cB flat\u201d<\/strong><\/em>, 3rd octave and played for half a note. <em><strong>\u201cC#3h\u201d<\/strong><\/em> likewise, denotes the pitch <em><strong>\u201cC sharp\u201d<\/strong><\/em>. <em><strong>\u201cRq\u201d<\/strong><\/em> represents <em><strong>\u201cRest\u201d<\/strong><\/em> for <em><strong>\u201cquarter\u201d<\/strong><\/em> note. As you can see, each token contains information about the pitch, it\u2019s octave and the duration. What about the <em><strong>\u201ctempo\u201d<\/strong><\/em>? It is by default 120 <em><strong>BPM<\/strong><\/em>.<\/p>\n<p>The staccato string in the next statement is slightly different.<span class=\"Apple-converted-space\">\u00a0 <\/span>Here, the token <em><strong>\u201cT100\u201d<\/strong><\/em> explicitly sets the tempo at 100 BPM. The next token <em><strong>\u201cV0\u201d<\/strong><\/em> denotes <em><strong>\u201cVoice 0\u201d<\/strong><\/em>, to <em><strong>\u201cTrack 0\u201d<\/strong><\/em>. Following these two, we have pitch specifications as we saw earlier, except that the octave and duration are unspecified. By default, <em><strong>JFugue<\/strong><\/em> uses <em><strong>4th octave<\/strong><\/em> and <em><strong>\u201cquarter\u201d<\/strong><\/em> note duration. Such assumptions help make the <em><strong>\u201cStaccato\u201d<\/strong> <\/em>string fairly compact.<\/p>\n<p>The next statement plays a <em><strong>chord progression<\/strong><\/em>, that is, sequence of <em><strong>\u201cChords\u201d<\/strong><\/em>. In this case, it plays <em><strong>\u201cC Major\u201d<\/strong><\/em>, <em><strong>\u201cF Major\u201d<\/strong><\/em>, <em><strong>&#8220;G Major\u201d,<\/strong><\/em> and <em><strong>\u201cC Major\u201d<\/strong><\/em>, in the <em><strong>3rd octave<\/strong><\/em>, each lasting <em><strong>\u201cquarter\u201d<\/strong><\/em> note. Instead of explicitly stating a chord progression like this, we can also use the <em><strong>\u201cChordProgression\u201d<\/strong><\/em> class and denote the chords through its indices as is commonly done. The chord progression object can then be passed to the <em><strong>\u201cplay\u201d<\/strong><\/em> function. The last line shows another interesting possibility. Here we are playing the chord progression as defined earlier, but using <em><strong>\u201cA Flat\u201d<\/strong><\/em> as the <em><strong>root<\/strong><\/em> instead of <em><strong>\u201cC\u201d<\/strong><\/em>.<\/p>\n<p>I wrote and tested the above program using <a href=\"https:\/\/www.jetbrains.com\/idea\/\" target=\"_blank\" rel=\"noopener noreferrer\"><em><strong>Intellij IDEA<\/strong><\/em><\/a>. It worked as expected on both my <em><strong>Mac<\/strong><\/em> and <em><strong>Windows<\/strong><\/em> machines.<span class=\"Apple-converted-space\">\u00a0<\/span><\/p>\n<p>The next part of my experiment was to use the <em><strong>JFugue<\/strong><\/em> library from <em><strong>LispWorks<\/strong> <strong>Lisp<\/strong><\/em> on <em><strong>Windows<\/strong><\/em>. This turned out to be pretty straightforward.<\/p>\n<figure id=\"attachment_2245\" aria-describedby=\"caption-attachment-2245\" style=\"width: 600px\" class=\"wp-caption aligncenter\"><a href=\"https:\/\/i0.wp.com\/www.rangakrish.com\/wp-content\/uploads\/2020\/12\/pre-code.jpg?ssl=1\"><img data-recalc-dims=\"1\" decoding=\"async\" data-attachment-id=\"2245\" data-permalink=\"https:\/\/www.rangakrish.com\/index.php\/2020\/12\/20\/jfugue-a-java-library-for-music-synthesis\/pre-code\/\" data-orig-file=\"https:\/\/www.rangakrish.com\/wp-content\/uploads\/2020\/12\/pre-code.jpg\" data-orig-size=\"1144,1382\" data-comments-opened=\"1\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;Admin&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;1608308040&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}\" data-image-title=\"Setting Up Java Environment\" data-image-description=\"&lt;p&gt;Setting Up Java Environment&lt;\/p&gt;\n\" data-image-caption=\"&lt;p&gt;Setting Up Java Environment&lt;\/p&gt;\n\" data-large-file=\"https:\/\/www.rangakrish.com\/wp-content\/uploads\/2020\/12\/pre-code-848x1024.jpg\" class=\"wp-image-2245\" src=\"https:\/\/i0.wp.com\/www.rangakrish.com\/wp-content\/uploads\/2020\/12\/pre-code.jpg?resize=600%2C725&#038;ssl=1\" alt=\"Setting Up Java Environment\" width=\"600\" height=\"725\" srcset=\"https:\/\/i0.wp.com\/www.rangakrish.com\/wp-content\/uploads\/2020\/12\/pre-code.jpg?resize=248%2C300&amp;ssl=1 248w, https:\/\/i0.wp.com\/www.rangakrish.com\/wp-content\/uploads\/2020\/12\/pre-code.jpg?resize=848%2C1024&amp;ssl=1 848w, https:\/\/i0.wp.com\/www.rangakrish.com\/wp-content\/uploads\/2020\/12\/pre-code.jpg?resize=768%2C928&amp;ssl=1 768w, https:\/\/i0.wp.com\/www.rangakrish.com\/wp-content\/uploads\/2020\/12\/pre-code.jpg?w=1144&amp;ssl=1 1144w\" sizes=\"(max-width: 600px) 100vw, 600px\" \/><\/a><figcaption id=\"caption-attachment-2245\" class=\"wp-caption-text\"><strong>Setting Up Java Environment<\/strong><\/figcaption><\/figure>\n<p>&nbsp;<\/p>\n<p>The actual implementation of the example code (as in the <strong>Java<\/strong> example above) is here:<\/p>\n<figure id=\"attachment_2246\" aria-describedby=\"caption-attachment-2246\" style=\"width: 600px\" class=\"wp-caption aligncenter\"><a href=\"https:\/\/i0.wp.com\/www.rangakrish.com\/wp-content\/uploads\/2020\/12\/code.jpg?ssl=1\"><img data-recalc-dims=\"1\" decoding=\"async\" data-attachment-id=\"2246\" data-permalink=\"https:\/\/www.rangakrish.com\/index.php\/2020\/12\/20\/jfugue-a-java-library-for-music-synthesis\/code-13\/\" data-orig-file=\"https:\/\/www.rangakrish.com\/wp-content\/uploads\/2020\/12\/code.jpg\" data-orig-size=\"940,573\" data-comments-opened=\"1\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;Admin&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;1608457246&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}\" data-image-title=\"Playing the Music\" data-image-description=\"&lt;p&gt;Playing the Music&lt;\/p&gt;\n\" data-image-caption=\"&lt;p&gt;Playing the Music&lt;\/p&gt;\n\" data-large-file=\"https:\/\/www.rangakrish.com\/wp-content\/uploads\/2020\/12\/code.jpg\" class=\"wp-image-2246\" src=\"https:\/\/i0.wp.com\/www.rangakrish.com\/wp-content\/uploads\/2020\/12\/code.jpg?resize=600%2C366&#038;ssl=1\" alt=\"Playing the Music\" width=\"600\" height=\"366\" srcset=\"https:\/\/i0.wp.com\/www.rangakrish.com\/wp-content\/uploads\/2020\/12\/code.jpg?resize=300%2C183&amp;ssl=1 300w, https:\/\/i0.wp.com\/www.rangakrish.com\/wp-content\/uploads\/2020\/12\/code.jpg?resize=768%2C468&amp;ssl=1 768w, https:\/\/i0.wp.com\/www.rangakrish.com\/wp-content\/uploads\/2020\/12\/code.jpg?w=940&amp;ssl=1 940w\" sizes=\"(max-width: 600px) 100vw, 600px\" \/><\/a><figcaption id=\"caption-attachment-2246\" class=\"wp-caption-text\"><strong>Playing the Music<\/strong><\/figcaption><\/figure>\n<p>The only change is that I wrote a simple class abstraction to model the <em><strong>\u201cPlayer\u201d<\/strong><\/em>. The reason is that, in future, I might want to render the music on an external instrument set (such as <em><strong>DAW<\/strong><\/em>) instead of the default Windows soundset. Nothing complicated here.<\/p>\n<p>The following shows the test function being run from the <em><strong>\u201cListener\u201d.<\/strong><\/em><\/p>\n<figure id=\"attachment_2247\" aria-describedby=\"caption-attachment-2247\" style=\"width: 500px\" class=\"wp-caption aligncenter\"><a href=\"https:\/\/i0.wp.com\/www.rangakrish.com\/wp-content\/uploads\/2020\/12\/session.jpg?ssl=1\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" data-attachment-id=\"2247\" data-permalink=\"https:\/\/www.rangakrish.com\/index.php\/2020\/12\/20\/jfugue-a-java-library-for-music-synthesis\/session-5\/\" data-orig-file=\"https:\/\/www.rangakrish.com\/wp-content\/uploads\/2020\/12\/session.jpg\" data-orig-size=\"702,154\" data-comments-opened=\"1\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;Admin&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;1608307738&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}\" data-image-title=\"Running the Code\" data-image-description=\"&lt;p&gt;Running the Code&lt;\/p&gt;\n\" data-image-caption=\"&lt;p&gt;Running the Code&lt;\/p&gt;\n\" data-large-file=\"https:\/\/www.rangakrish.com\/wp-content\/uploads\/2020\/12\/session.jpg\" class=\"wp-image-2247\" src=\"https:\/\/i0.wp.com\/www.rangakrish.com\/wp-content\/uploads\/2020\/12\/session.jpg?resize=500%2C110&#038;ssl=1\" alt=\"Running the Code\" width=\"500\" height=\"110\" srcset=\"https:\/\/i0.wp.com\/www.rangakrish.com\/wp-content\/uploads\/2020\/12\/session.jpg?resize=300%2C66&amp;ssl=1 300w, https:\/\/i0.wp.com\/www.rangakrish.com\/wp-content\/uploads\/2020\/12\/session.jpg?w=702&amp;ssl=1 702w\" sizes=\"(max-width: 500px) 100vw, 500px\" \/><\/a><figcaption id=\"caption-attachment-2247\" class=\"wp-caption-text\"><strong>Running the Code<\/strong><\/figcaption><\/figure>\n<h3><span class=\"Apple-converted-space\">\u00a0<\/span>How does JFugue compare with Opusmodus?<\/h3>\n<p>In terms of representing music, <em><strong>JFugue<\/strong><\/em> uses a string representation called <em><strong>\u201cStaccato\u201d<\/strong><\/em> to depict pitch, rhythm, velocity, tempo, etc. <em><strong>Opusmodus<\/strong><\/em> uses <em><strong>OMN<\/strong><\/em> for this purpose. Although the syntax differs, the expressive power is almost the same. <em><strong>Opusmodus<\/strong><\/em> is vastly superior when it comes to built-in algorithms for music composition. For instance, in <em><strong>Opusmodus<\/strong><\/em>, you can easily apply <em><strong>Lindenmayer<\/strong><\/em> system for music synthesis. Or convert different types of &#8220;noise&#8221; (such as <em><strong>White<\/strong><\/em> noise, <em><strong>Pink<\/strong><\/em> noise, etc.) to pitch. There<span class=\"Apple-converted-space\">\u00a0 <\/span>are hundreds of built-in functions that let you do fancy composition. It is also easy to hook it up to external <em><strong>Digital Audio Workstation<\/strong><\/em>s such as <a href=\"https:\/\/www.uvi.net\/falcon.html\" target=\"_blank\" rel=\"noopener noreferrer\"><em><strong>Falcon<\/strong><\/em><\/a>\u00a0through <em><strong>MIDI<\/strong><\/em> or <em><strong>OSC<\/strong><\/em>. Most importantly, <em><strong>Opusmodus<\/strong><\/em> is not just a library, but a complete environment for music creation. You can even do fancy stuff like plot graphs and render <em><strong>MusicXML<\/strong><\/em>. The comparison between the two products might not even be fair! <em><strong>Opusmodus<\/strong><\/em> is a commercial product and hence people expect it to provide more.<span class=\"Apple-converted-space\">\u00a0<\/span><\/p>\n<p>One man advantage of <em><strong>JFugue<\/strong><\/em> is that it is in <em><strong>Java<\/strong><\/em> and hence can run on any platform. <em><strong>Opusmodus<\/strong><\/em> is at present limited to <em><strong>Mac OS<\/strong><\/em>.<\/p>\n<p>You can download the <em><strong>Java<\/strong><\/em> source <a href=\"http:\/\/www.rangakrish.com\/downloads\/JFTest.java\" target=\"_blank\" rel=\"noopener noreferrer\"><em><strong>here<\/strong><\/em><\/a>\u00a0and the <em><strong>Lisp<\/strong><\/em> source <a href=\"http:\/\/www.rangakrish.com\/downloads\/jfugue-test.lisp\" target=\"_blank\" rel=\"noopener noreferrer\"><em><strong>here<\/strong><\/em><\/a>.<\/p>\n<p>Happy holidays!<\/p>\n","protected":false},"excerpt":{"rendered":"<p>JFugue\u00a0is an open-source Java library that can be used for algorithmic music composition. Developed by David Koelle, currently it is in its fifth major version. You can get the library from here. I had downloaded the library some time ago, but could not spend much time since my primary focus has been on Opusmodus. This [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"advanced_seo_description":"","jetpack_seo_html_title":"","jetpack_seo_noindex":false,"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_publicize_message":"","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":true,"jetpack_social_options":{"image_generator_settings":{"template":"highway","default_image_id":0,"font":"","enabled":false},"version":2},"jetpack_post_was_ever_published":false},"categories":[18,5,17],"tags":[260,69,258,19,99,259],"class_list":["post-2242","post","type-post","status-publish","format-standard","hentry","category-lisp","category-music","category-programming","tag-algorithmic-music-composition","tag-java","tag-jfugue","tag-lisp","tag-lispworks","tag-music"],"jetpack_publicize_connections":[],"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"jetpack_shortlink":"https:\/\/wp.me\/p9OLnF-Aa","jetpack-related-posts":[{"id":2206,"url":"https:\/\/www.rangakrish.com\/index.php\/2020\/11\/22\/a-library-for-algorithmic-music-composition\/","url_meta":{"origin":2242,"position":0},"title":"A Library for Algorithmic Music Composition","author":"admin","date":"November 22, 2020","format":false,"excerpt":"I have recently started implementing a library for algorithmic music composition. It provides higher-level algorithms and abstractions for composing multi-track music, and works with Opusmodus\u00a0software. Opusmodus is a great platform for music composition and has excellent support for MIDI-based music. My library is an attempt to enrich the Opusmodus platform\u2026","rel":"","context":"In &quot;LISP&quot;","block_context":{"text":"LISP","link":"https:\/\/www.rangakrish.com\/index.php\/category\/lisp\/"},"img":{"alt_text":"App for Controlling Opusmodus","src":"https:\/\/i0.wp.com\/www.rangakrish.com\/wp-content\/uploads\/2020\/11\/Screen1-300x139.jpg?resize=350%2C200&ssl=1","width":350,"height":200},"classes":[]},{"id":2256,"url":"https:\/\/www.rangakrish.com\/index.php\/2021\/01\/02\/using-jfugue-with-external-daw\/","url_meta":{"origin":2242,"position":1},"title":"Using JFugue with External DAW","author":"admin","date":"January 2, 2021","format":false,"excerpt":"Let this New Year 2021 bring health and happiness to us all! In the last article, I talked briefly about JFugue and showed how to access it from LispWorks Lisp\u00a0on a PC running Windows 10. In that example, the music was rendered by the built-in synthesizer. Although this is fine,\u2026","rel":"","context":"In &quot;LISP&quot;","block_context":{"text":"LISP","link":"https:\/\/www.rangakrish.com\/index.php\/category\/lisp\/"},"img":{"alt_text":"Checking Available MIDI Devices","src":"https:\/\/i0.wp.com\/www.rangakrish.com\/wp-content\/uploads\/2021\/01\/Code-to-check-devices-300x39.jpg?resize=350%2C200&ssl=1","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/www.rangakrish.com\/wp-content\/uploads\/2021\/01\/Code-to-check-devices-300x39.jpg?resize=350%2C200&ssl=1 1x, https:\/\/i0.wp.com\/www.rangakrish.com\/wp-content\/uploads\/2021\/01\/Code-to-check-devices-300x39.jpg?resize=525%2C300&ssl=1 1.5x"},"classes":[]},{"id":193,"url":"https:\/\/www.rangakrish.com\/index.php\/2016\/03\/27\/user-defined-literals-in-c\/","url_meta":{"origin":2242,"position":2},"title":"User-defined Literals in C++","author":"admin","date":"March 27, 2016","format":false,"excerpt":"C++11 introduced user-defined literals, allowing programmers to define special suffixes that can be associated with the built-in literal types: character, integer, float, boolean, and pointer. When designed and used properly, these provide nice syntactic sugar facilitating readability and at the same time, increasing type safety. For example, I can define\u2026","rel":"","context":"In &quot;C++&quot;","block_context":{"text":"C++","link":"https:\/\/www.rangakrish.com\/index.php\/category\/c\/"},"img":{"alt_text":"User-defined Literal","src":"https:\/\/i0.wp.com\/www.rangakrish.com\/wp-content\/uploads\/2016\/03\/User-defined-Literal.png?resize=350%2C200","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/www.rangakrish.com\/wp-content\/uploads\/2016\/03\/User-defined-Literal.png?resize=350%2C200 1x, https:\/\/i0.wp.com\/www.rangakrish.com\/wp-content\/uploads\/2016\/03\/User-defined-Literal.png?resize=525%2C300 1.5x"},"classes":[]},{"id":2406,"url":"https:\/\/www.rangakrish.com\/index.php\/2021\/05\/09\/eager-future2-common-lisp-library\/","url_meta":{"origin":2242,"position":3},"title":"Eager Future2 Common Lisp Library","author":"admin","date":"May 9, 2021","format":false,"excerpt":"Eager Future2 is a Common Lisp library that facilitates parallel computation. It is based on the idea of a \u201cfuture\u201d that acts as a \u201cproxy\u201d for a concurrently computed expression. Unlike the \u201clparallel\u201d library that I had discussed in the last article, this library does not give us control over\u2026","rel":"","context":"In &quot;LISP&quot;","block_context":{"text":"LISP","link":"https:\/\/www.rangakrish.com\/index.php\/category\/lisp\/"},"img":{"alt_text":"Fibonacci Calculation - 3 Ways","src":"https:\/\/i0.wp.com\/www.rangakrish.com\/wp-content\/uploads\/2021\/05\/Code-232x300.jpg?resize=350%2C200&ssl=1","width":350,"height":200},"classes":[]},{"id":2334,"url":"https:\/\/www.rangakrish.com\/index.php\/2021\/02\/28\/calling-c-methods-from-lispworks-lisp-through-com-interface\/","url_meta":{"origin":2242,"position":4},"title":"Calling C# Methods from LispWorks Lisp through COM Interface","author":"admin","date":"February 28, 2021","format":false,"excerpt":"In an earlier article, I showed how to invoke C# methods from Sicstus Prolog. Today, I would like to detail the steps for doing the same from LispWorks Lisp. LispWorks Enterprise Edition comes budled with support for COM and Automation. This is what we will be using. What this means\u2026","rel":"","context":"In &quot;LISP&quot;","block_context":{"text":"LISP","link":"https:\/\/www.rangakrish.com\/index.php\/category\/lisp\/"},"img":{"alt_text":"The COM Server in C#","src":"https:\/\/i0.wp.com\/www.rangakrish.com\/wp-content\/uploads\/2021\/02\/C-Code-300x267.jpg?resize=350%2C200&ssl=1","width":350,"height":200},"classes":[]},{"id":41,"url":"https:\/\/www.rangakrish.com\/index.php\/2015\/10\/08\/learning-lisp-resources\/","url_meta":{"origin":2242,"position":5},"title":"Learning LISP &#8211; Resources","author":"admin","date":"October 8, 2015","format":false,"excerpt":"During my talks on Lisp Programming, I am invariably asked to suggest good books to start learning the language. Here is a (partial) list that I readily recommend. Beginner Level: ANSI Common Lisp, Paul Graham, Prentice Hall, 1996. Common LISP: A Tutorial, Wendy L.Milner, Prentice Hall, 1988. Land of LISP:\u2026","rel":"","context":"In &quot;LISP&quot;","block_context":{"text":"LISP","link":"https:\/\/www.rangakrish.com\/index.php\/category\/lisp\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]}],"_links":{"self":[{"href":"https:\/\/www.rangakrish.com\/index.php\/wp-json\/wp\/v2\/posts\/2242","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.rangakrish.com\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.rangakrish.com\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.rangakrish.com\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.rangakrish.com\/index.php\/wp-json\/wp\/v2\/comments?post=2242"}],"version-history":[{"count":0,"href":"https:\/\/www.rangakrish.com\/index.php\/wp-json\/wp\/v2\/posts\/2242\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.rangakrish.com\/index.php\/wp-json\/wp\/v2\/media?parent=2242"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.rangakrish.com\/index.php\/wp-json\/wp\/v2\/categories?post=2242"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.rangakrish.com\/index.php\/wp-json\/wp\/v2\/tags?post=2242"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}