Generating Virtual Guitar Strings Using Scripts

Total Page:16

File Type:pdf, Size:1020Kb

Generating Virtual Guitar Strings Using Scripts Generating Virtual Guitar Strings Using Scripts Luka Kunic´ and Zeljkaˇ Mihajlovic´ University of Zagreb, Faculty of Electrical Engineering and Computing, Zagreb, Croatia [email protected], [email protected] Abstract—Artists who create 3D models usually rely on the This paper describes a method for automatically generating traditional method of direct mesh manipulation using basic and animating 3D models of musical strings, which will be operations such as translation, rotation, scaling, and extrusion. In used for creating interactive virtual string instruments. Existing some cases, creating a model in this manner requires performing many repetitive and precise actions, which makes a fully manual procedural modeling techniques, briefly covered in Section II, approach suboptimal. This paper explores an alternative concept mostly rely on some form of stochastic behavior in order to of 3D modeling using scripts, which aims to automate parts of achieve the final shape of the generated model. We present the modeling process. a more deterministic approach, in a sense that running the Existing procedural algorithms use scripts to generate ob- algorithm repeatedly with the same set of parameters will jects based on mathematical models (e.g. generating realistic always result in the same model. The primary gain of this terrains using fractals), or to build complex structures using simple template models (model synthesis). Unlike those methods, method is not in the model creation, since the actual mesh which rely on stochastic behavior to generate pseudo-randomized is quite simple, but rather in automatically adding complex shapes, the goal of this method is to write scripts that generate behavior to the model through morphing and animations. parametric objects which would be either difficult or time- Another significant advantage over a manual process is the consuming to model by hand. The example described in this ability to easily generate arrays of objects using various paper is a script that generates animated strings for musical instruments. Although the basic shape of a string is quite simple, parameters. This is quite important for rapid prototyping, animating string vibrations and bending can be quite a tedious where the user iteratively creates variations of the model until task, especially because of the various shapes and sizes of string they are satisfied with the result. Further discussion about the instruments. motivation for this method can be found in Section III. The string generation process, described in detail in Sec- tion IV, includes: creating the string mesh based on a set I. INTRODUCTION of input parameters, adding vertex animations to the mesh in order to simulate string bending, adding and attaching an With the advancements in computer graphics, 3D modeling armature to the mesh, and animating the string vibrations. The has become a major part of many industries. Artists who results are presented in Section V. create 3D models most commonly use dedicated software solutions that include a 3D viewport, which allows them to II. RELATED WORK directly modify the mesh data using basic operations such as translation, rotation, scaling and extrusion. While this The following subsections present several valuable methods traditional method can be used to produce very good results, for automatically generating 3D content: procedural modeling, those results are often difficult to achieve due to large amounts template-based methods and interactive simulations. of manual work required. This is especially true for large-scale environments such as terrains or entire cities used in movie A. Procedural modeling and video game industries, which are practically impossible Procedural techniques are algorithms that are used to deter- to generate manually in a reasonable time frame. However, mine the characteristics of an object or effect [3]. An algorithm many tasks involved in this process can be entirely or at least is implemented as a procedure which contains an abstract partially automated, allowing for a faster and less repetitive representation of the desired features for the output model. workflow. Executing the procedure calculates the features based on input Automating a task can be as simple as creating a custom tool parameters and constraints set by the user and generates a that performs some commonly used or repetitive actions. This finished model which satisfies those constraints. This allows allows users to focus on the creative aspect of modeling instead a high level of control and flexibility. The procedures often of being hindered by the lack of software features. On the other incorporate a form of stochastic behavior in order to introduce hand, scripts can be used to generate complex objects based a level of randomization into the output models. This is useful on a set of parameters and constraints, which can be given by when modeling objects which are represented in nature, so that the user or determined by the choice of the algorithm being the finished product appears more organic and realistic. used. Obviously, these scripts must be tailored to each specific Procedural modeling techniques have been used in computer problem, which brings into question whether the gains of using graphics since the early beginnings of the field. At first, pro- a script justify the time spent on development. However, if cedures were used to generate images and textures resembling a task can be generalized or parametrized, writing a script materials found in nature, as it was found that many natural to perform that task can greatly reduce time spent working shapes follow distinct patterns which could be described by on different areas of the model. Furthermore, variations of mathematical models. A prominent example of such textures algorithms developed for such generic tasks can be used for are fractals, introduced by Mandelbrot in 1982 [7]. Fractals can solving various modeling problems in different domains. be used to create very natural looking objects and structures 264 MIPRO 2017/DC VIS because of their self-similarity property, which is why they are widely used in computer graphics. A different approach to procedural modeling uses formal languages and grammars to describe the output model. One such model was introduced by Lindenmayer who used his L-systems [6] to formally describe the growth of plants. The system consists of an alphabet of symbols and set of production rules, which are used to generate strings of symbols that define a plant. This technique is often used in computer graphics because of its high versatility, and because it can be easily extended with additional functionality [8], [13], [14]. Procedural techniques are also commonly used to create and animate natural volumetric phenomena that cannot realistically be modeled with mesh geometry, such as gasses, clouds or fire [3], [5]. Attributes like color and transparency can be Fig. 1. The result of the terrain synthesis algorithm. On the right is the controlled using procedures that simulate air turbulence and finished terrain which was generated based on the height map of Mount Jackson in Colorado, USA (center left) and a user defined sketch (upper left). noise in the space occupied by the model volume. Similar The combined height map generated by the algorithm is shown in the lower techniques can also be applied to particle systems which left corner. are also guided algorithmically and can be affected by some external influence. interact with natural forces like wind, etc. These types of simu- B. Model synthesis and template-based modeling lations are often used for animating objects in video games and Certain objects cannot entirely be described using math- other virtual environments. Simulations used for animating the ematical models. This applies to most man-made structures objects typically have many parameters and obey certain laws such as buildings or machines that are often found in 3D of physics which require performing complex calculations. environments. For example, when creating a large virtual city, These calculations can either be done in real-time, which often it is important to include enough diversity so that the city sacrifices accuracy for computation performance, or they can does not seem artificial, but at the same time most buildings be precomputed, in which case the calculated simulation will should have similar features so that they visually fit together. not be able to adapt to the surrounding objects in the virtual One of the solutions would be template-based modeling, a set environment during execution. of techniques that take simple objects as input and use the III. MOTIVATION objects’ distinct features to generate various other objects that incorporate those features. Throughout history, music has been a prevalent source One such algorithm named model synthesis is presented of entertainment in our society. Professional musicians have by Merell and Manocha [10]. Their algorithm takes an ob- always been praised for their high technical abilities which ject and uses it as a template to create complex structures. they had developed over years of dedication and daily practice. For a given point in space for the model being generated, Some of those musicians were also engineers, so they started their algorithm looks at the surrounding area of the point using their expertise in both areas to create robotic instruments and calculates the possible geometry samples which can be like self-playing pianos, guitars, and other instruments [2], generated at that point. Their algorithm also takes into account [15], [16]. In the modern era of technology, with continuous various constraints: predetermined dimensions of an object, advancements in the field of computer graphics, it is natural ratios between dimensions, connectivity constraints, and the to explore the possibilities of placing musical instruments into general macroscopic shape and scale of the output model. virtual environments. Furthermore, this algorithm can take multiple objects as input, In order to create a self-playing virtual instrument, the 3D which results in output models with a high degree of variety.
Recommended publications
  • African Music Vol 6 No 2(Seb).Cdr
    94 JOURNAL OF INTERNATIONAL LIBRARY OF AFRICAN MUSIC THE GORA AND THE GRAND’ GOM-GOM: by ERICA MUGGLESTONE 1 INTRODUCTION For three centuries the interest of travellers and scholars alike has been aroused by the gora, an unbraced mouth-resonated musical bow peculiar to South Africa, because it is organologically unusual in that it is a blown chordophone.2 A split quill is attached to the bowstring at one end of the instrument. The string is passed through a hole in one end of the quill and secured; the other end of the quill is then bound or pegged to the stave. The string is lashed to the other end of the stave so that it may be tightened or loosened at will. The player holds the quill lightly bet­ ween his parted lips, and, by inhaling and exhaling forcefully, causes the quill (and with it the string) to vibrate. Of all the early descriptions of the gora, that of Peter Kolb,3 a German astronom­ er who resided at the Cape of Good Hope from 1705 to 1713, has been the most contentious. Not only did his character and his publication in general come under attack, but also his account of Khoikhoi4 musical bows in particular. Kolb’s text indicates that two types of musical bow were observed, to both of which he applied the name gom-gom. The use of the same name for both types of bow and the order in which these are described in the text, seems to imply that the second type is a variant of the first.
    [Show full text]
  • Lab 12. Vibrating Strings
    Lab 12. Vibrating Strings Goals • To experimentally determine the relationships between the fundamental resonant frequency of a vibrating string and its length, its mass per unit length, and the tension in the string. • To introduce a useful graphical method for testing whether the quantities x and y are related by a “simple power function” of the form y = axn. If so, the constants a and n can be determined from the graph. • To experimentally determine the relationship between resonant frequencies and higher order “mode” numbers. • To develop one general relationship/equation that relates the resonant frequency of a string to the four parameters: length, mass per unit length, tension, and mode number. Introduction Vibrating strings are part of our common experience. Which as you may have learned by now means that you have built up explanations in your subconscious about how they work, and that those explanations are sometimes self-contradictory, and rarely entirely correct. Musical instruments from all around the world employ vibrating strings to make musical sounds. Anyone who plays such an instrument knows that changing the tension in the string changes the pitch, which in physics terms means changing the resonant frequency of vibration. Similarly, changing the thickness (and thus the mass) of the string also affects its sound (frequency). String length must also have some effect, since a bass violin is much bigger than a normal violin and sounds much different. The interplay between these factors is explored in this laboratory experi- ment. You do not need to know physics to understand how instruments work. In fact, in the course of this lab alone you will engage with material which entire PhDs in music theory have been written.
    [Show full text]
  • The Science of String Instruments
    The Science of String Instruments Thomas D. Rossing Editor The Science of String Instruments Editor Thomas D. Rossing Stanford University Center for Computer Research in Music and Acoustics (CCRMA) Stanford, CA 94302-8180, USA [email protected] ISBN 978-1-4419-7109-8 e-ISBN 978-1-4419-7110-4 DOI 10.1007/978-1-4419-7110-4 Springer New York Dordrecht Heidelberg London # Springer Science+Business Media, LLC 2010 All rights reserved. This work may not be translated or copied in whole or in part without the written permission of the publisher (Springer Science+Business Media, LLC, 233 Spring Street, New York, NY 10013, USA), except for brief excerpts in connection with reviews or scholarly analysis. Use in connection with any form of information storage and retrieval, electronic adaptation, computer software, or by similar or dissimilar methodology now known or hereafter developed is forbidden. The use in this publication of trade names, trademarks, service marks, and similar terms, even if they are not identified as such, is not to be taken as an expression of opinion as to whether or not they are subject to proprietary rights. Printed on acid-free paper Springer is part of Springer ScienceþBusiness Media (www.springer.com) Contents 1 Introduction............................................................... 1 Thomas D. Rossing 2 Plucked Strings ........................................................... 11 Thomas D. Rossing 3 Guitars and Lutes ........................................................ 19 Thomas D. Rossing and Graham Caldersmith 4 Portuguese Guitar ........................................................ 47 Octavio Inacio 5 Banjo ...................................................................... 59 James Rae 6 Mandolin Family Instruments........................................... 77 David J. Cohen and Thomas D. Rossing 7 Psalteries and Zithers .................................................... 99 Andres Peekna and Thomas D.
    [Show full text]
  • The Musical Kinetic Shape: a Variable Tension String Instrument
    The Musical Kinetic Shape: AVariableTensionStringInstrument Ismet Handˇzi´c, Kyle B. Reed University of South Florida, Department of Mechanical Engineering, Tampa, Florida Abstract In this article we present a novel variable tension string instrument which relies on a kinetic shape to actively alter the tension of a fixed length taut string. We derived a mathematical model that relates the two-dimensional kinetic shape equation to the string’s physical and dynamic parameters. With this model we designed and constructed an automated instrument that is able to play frequencies within predicted and recognizable frequencies. This prototype instrument is also able to play programmed melodies. Keywords: musical instrument, variable tension, kinetic shape, string vibration 1. Introduction It is possible to vary the fundamental natural oscillation frequency of a taut and uniform string by either changing the string’s length, linear density, or tension. Most string musical instruments produce di↵erent tones by either altering string length (fretting) or playing preset and di↵erent string gages and string tensions. Although tension can be used to adjust the frequency of a string, it is typically only used in this way for fine tuning the preset tension needed to generate a specific note frequency. In this article, we present a novel string instrument concept that is able to continuously change the fundamental oscillation frequency of a plucked (or bowed) string by altering string tension in a controlled and predicted Email addresses: [email protected] (Ismet Handˇzi´c), [email protected] (Kyle B. Reed) URL: http://reedlab.eng.usf.edu/ () Preprint submitted to Applied Acoustics April 19, 2014 Figure 1: The musical kinetic shape variable tension string instrument prototype.
    [Show full text]
  • A Comparison of Viola Strings with Harmonic Frequency Analysis
    University of Nebraska - Lincoln DigitalCommons@University of Nebraska - Lincoln Student Research, Creative Activity, and Performance - School of Music Music, School of 5-2011 A Comparison of Viola Strings with Harmonic Frequency Analysis Jonathan Paul Crosmer University of Nebraska-Lincoln, [email protected] Follow this and additional works at: https://digitalcommons.unl.edu/musicstudent Part of the Music Commons Crosmer, Jonathan Paul, "A Comparison of Viola Strings with Harmonic Frequency Analysis" (2011). Student Research, Creative Activity, and Performance - School of Music. 33. https://digitalcommons.unl.edu/musicstudent/33 This Article is brought to you for free and open access by the Music, School of at DigitalCommons@University of Nebraska - Lincoln. It has been accepted for inclusion in Student Research, Creative Activity, and Performance - School of Music by an authorized administrator of DigitalCommons@University of Nebraska - Lincoln. A COMPARISON OF VIOLA STRINGS WITH HARMONIC FREQUENCY ANALYSIS by Jonathan P. Crosmer A DOCTORAL DOCUMENT Presented to the Faculty of The Graduate College at the University of Nebraska In Partial Fulfillment of Requirements For the Degree of Doctor of Musical Arts Major: Music Under the Supervision of Professor Clark E. Potter Lincoln, Nebraska May, 2011 A COMPARISON OF VIOLA STRINGS WITH HARMONIC FREQUENCY ANALYSIS Jonathan P. Crosmer, D.M.A. University of Nebraska, 2011 Adviser: Clark E. Potter Many brands of viola strings are available today. Different materials used result in varying timbres. This study compares 12 popular brands of strings. Each set of strings was tested and recorded on four violas. We allowed two weeks after installation for each string set to settle, and we were careful to control as many factors as possible in the recording process.
    [Show full text]
  • Experiment 12
    Experiment 12 Velocity and Propagation of Waves 12.1 Objective To use the phenomenon of resonance to determine the velocity of the propagation of waves in taut strings and wires. 12.2 Discussion Any medium under tension or stress has the following property: disturbances, motions of the matter of which the medium consists, are propagated through the medium. When the disturbances are periodic, they are called waves, and when the disturbances are simple harmonic, the waves are sinusoidal and are characterized by a common wavelength and frequency. The velocity of propagation of a disturbance, whether or not it is periodic, depends generally upon the tension or stress in the medium and on the density of the medium. The greater the stress: the greater the velocity; and the greater the density: the smaller the velocity. In the case of a taut string or wire, the velocity v depends upon the tension T in the string or wire and the mass per unit length µ of the string or wire. Theory predicts that the relation should be T v2 = (12.1) µ Most disturbances travel so rapidly that a direct determination of their velocity is not possible. However, when the disturbance is simple harmonic, the sinusoidal character of the waves provides a simple method by which the velocity of the waves can be indirectly determined. This determination involves the frequency f and wavelength λ of the wave. Here f is the frequency of the simple harmonic motion of the medium and λ is from any point of the wave to the next point of the same phase.
    [Show full text]
  • The Simulation of Piano String Vibration
    The simulation of piano string vibration: From physical models to finite difference schemes and digital waveguides Julien Bensa, Stefan Bilbao, Richard Kronland-Martinet, Julius Smith Iii To cite this version: Julien Bensa, Stefan Bilbao, Richard Kronland-Martinet, Julius Smith Iii. The simulation of piano string vibration: From physical models to finite difference schemes and digital waveguides. Journal of the Acoustical Society of America, Acoustical Society of America, 2003, 114 (2), pp.1095-1107. 10.1121/1.1587146. hal-00088329 HAL Id: hal-00088329 https://hal.archives-ouvertes.fr/hal-00088329 Submitted on 1 Aug 2006 HAL is a multi-disciplinary open access L’archive ouverte pluridisciplinaire HAL, est archive for the deposit and dissemination of sci- destinée au dépôt et à la diffusion de documents entific research documents, whether they are pub- scientifiques de niveau recherche, publiés ou non, lished or not. The documents may come from émanant des établissements d’enseignement et de teaching and research institutions in France or recherche français ou étrangers, des laboratoires abroad, or from public or private research centers. publics ou privés. Distributed under a Creative Commons Attribution| 4.0 International License The simulation of piano string vibration: From physical models to finite difference schemes and digital waveguides Julien Bensa, Stefan Bilbao, Richard Kronland-Martinet, and Julius O. Smith III Center for Computer Research in Music and Acoustics (CCRMA), Department of Music, Stanford University, Stanford, California 94305-8180 A model of transverse piano string vibration, second order in time, which models frequency-dependent loss and dispersion effects is presented here. This model has many desirable properties, in particular that it can be written as a well-posed initial-boundary value problem ͑permitting stable finite difference schemes͒ and that it may be directly related to a digital waveguide model, a digital filter-based algorithm which can be used for musical sound synthesis.
    [Show full text]
  • LCC for Guitar - Introduction
    LCC for Guitar - Introduction In order for guitarists to understand the significance of the Lydian Chromatic Concept of Tonal Organization and the concept of Tonal Gravity, one must first look at the nature of string vibration and what happens when a string vibrates. The Lydian Chromatic concept is based in the science of natural acoustics, so it is important to understand exactly what happens acoustically to a note and the harmonic overtones that nature creates. A guitar string (or any string from any stringed instrument) vibrates when plucked or struck, producing a tone. The vibrating string creates a natural resonant series of vibration patterns which are called Harmonics. When you strike the string by itself, it vibrates back and forth and moves air molecules, producing sound. This is called a FUNDAMENTAL. (See fig 1.01a) Fig 1.01a – FUNADAMENTAL/OPEN STRING = A 440hz/440cps The fundamental vibration pattern on a single string. This is the FUNDAMENTAL vibration or tone and can be equated to a fixed amount of vibrations or cycles per second (cps) For example, consider this to be the open ‘A’ string producing the note A which in turn a universally considered to vibrate at 440cps or the equivalent of 440hz. If you loosen a guitar string you can visually see the result of the vibrations; the string makes a wide arc near the center and it narrows towards each end. When you touch the string exactly in the center (exactly between both ends or on the guitar the physical location is at the 12 th fret) it divides the vibration exactly in half and produces a note or tone exactly one octave higher in pitch.
    [Show full text]
  • Streharne P398EMI Final Report
    Stephen Treharne Physics 398 project, Fall 2000 Abstract: The sustain of a guitar, that is, the amount of time a note will resonate before fading away due to natural dampening effects, has been the subject of much conjecture and endless speculation for as long as acoustic and electric guitars have been played. Due to the importance of sustain in determining the overall sound quality and playability of a guitar, however, such speculation and debate surrounding the issue of guitar sustain is justifiable. Unfortunately, much of this speculation derives from the inexact qualitative methods characteristically used to describe sustain, usually based on the human ear and a perceived sense of how strong a note sounds for a given span of time. Indeed, many claims have been made concerning the effect that adding weight to the headstock of a guitar, playing with new strings, playing in certain kinds of weather, etc., has on increasing the sustain of a guitar. Although such reports give a basis for some interesting speculation, many of them suffer for lack of quantifiable evidence. This experiment seeks to establish at least the beginnings of using objective and quantifiable measurements taken in a laboratory setting to begin the scientific investigation of confirming or refuting many of these claims. Although the setup of the equipment used to make these measurements, and, more importantly, the writing of the code used in the computer program developed to take the essential data, was the most time consuming step in the process of doing the experiment, the underlying principle used to measure the sustain of a guitar was quite simple.
    [Show full text]
  • The University of Hong Kong Department of Physics Physics Laboratory PHYS3850 Wave and Optics Experiment No.3850-1: Wave And
    Modified by Data Ng Wave and Resonance Version 1.0 November, 2015 Laboratory Manual The University of Hong Kong Department of Physics Physics Laboratory PHYS3850 Wave and Optics Experiment No.3850-1: Wave and Resonance Name: University No.: A. AIMS 1. Experimentally determine the relationship between the length of a stretched string and the frequencies at which resonance occurs at a constant tension; 2. Verify the variation of the wave frequency with the tension in the stretched string with a constant length; 3. Investigate the resonance modes of a stretched string. 4. Determine the velocity of the wave B. INTRODUCTION The standard qualitative sonometer experiments can be performed by varying the tension, length, and linear density a string and observing the effects on the pitch of the plucked string. Also, by adding the Driver/Detector Coils, a function generator capable of delivering 0.5A of current, and an oscilloscope, the quantitative experiments can be performed for verifying the equations for wave motion on a string: 2L where λ = wavelength (m) L = length of string (m) n n = number of antinodes T v v = velocity of wave propagation (m/s) 1 T = string tension (N) µ = linear density of string or mass per unit of string (kg/m) n T f f = frequency of wave (Hz) 2L This experiment will be conducted using a Sonometer to investigate how the frequencies of vibrating wires vary with length, density, and tension. The driver and detector coil can be placed anywhere along the string. The driver coil drives string vibrations at any frequency the function generator will produce.
    [Show full text]
  • Waves on Strings
    Waves on Strings Traveling Waves Giving Rise To Standing Wave Patterns on Thin Strings January 20, 2017 You will not return this handout to the instructor at the end of the lab period. The Waves on Strings lab has two parts. Instructions Before the lab, read all sections of the This lab consists of Activities #1, #2, #3, and #4. Introduction to Waves on Stretched Strings, and answer the Pre-Lab Work through the activities in the usual manner in the questions on the last page of this lab, and hand in your results at the end of the regularly handout. Hand in your answers as scheduled lab period. you enter the general physics lab. Table of Contents 0. Introduction to waves on stretched springs 2 1. Activity #1: Demonstration of standing waves on a string 8 2. Activity #2: Standing waves for n = 3, 4, 5, … 9 3. Activity #3: The slope of the linear fit 11 4. Activity #4: Questions and what to hand in when you are finished 12 Page 1 © Le Moyne Physics Faculty Waves on Strings Waves on Strings 0. Introduction to waves on stretched springs References James S. Walker, Physics, 4th edition, chapter 14, especially section 14.8 Randall D. Knight, Physics for Scientists and Engineers, 3rd edition, chapter 21, especially section 21.3 0.1 A traveling wave on a stretched string λ +A Time 1 x-axis -A +A Time 2 x-axis -A bead +A Time 3 x-axis -A Figure 1 This figure shows a series of snapshots of a traveling wave on a long stretched string.
    [Show full text]
  • Guitar and the Nature of Music.Pub
    Guitar And The Nature Of Music Sound and the Vibrating String "Acoustics" is the branch of science that deals with sound. The science is very complex, but a little knowledge of the nature of sound, and in particular a vibrating string, can be very helpful in getting the most out of your guitar experience. The “Waving” String A string vibrates and creates a complex wave of energy pulses. These pulses are either transmitted to the ear through air or are translated as electrical pulses that are transmitted to a speaker system and then to the ear. A string of fixed tension, density and length vibrates in a nearly continuous wave of sound as a function of amplitude, duration and frequency. Continuous waves of sound have many properties and are studied in depth in the field of acoustics. A vibrating guitar string is not exactly a continuous wave but behaves close enough to be considered such. (Harvard Dictionary of Music) “Amplitude” affects the degree of perceived loudness and is affected by the amount of energy used to set the string in motion. “Duration” is the measure of length of time of vibration and is also affected by the amount of energy used to set the string in motion. “Frequency” is measured in cycles per second called “hertz” and is not generally affected by the energy used to strike the string. The frequency of tones in music are referred to in terms of “pitch” . The “fundamental frequency” is the frequency of the largest vibration. It is also the "perceived" pitch. The audible frequency of sound for average humans is approximately 20 to 20,000 hertz.
    [Show full text]