Announcement

Collapse
No announcement yet.

.sms help

Collapse
This topic is closed.
X
X
Collapse
First Prev Next Last
 
  • Filter
  • Time
  • Show
Clear All
new posts

    .sms help

    hello,
    i was working on a locomotive (LIRR m7 ) and i was working on the .sms file. i saw the following in the .sms of another train
    )
    FrequencyCurve(
    SpeedControlled
    CurvePoints ( 3
    -70.0 14000
    0.0 11025
    70.0 14000
    )
    Granularity ( 25 )
    )
    VolumeCurve(
    SpeedControlled
    CurvePoints ( 5
    -70.0 0.1
    -1.0 0.3
    0.0 0.0
    1.0 0.3
    70.0 0.1

    what do the numbers in the frequency curve do and how do they affect the sound?
    what is granularity?
    AND how do the numbers in the volume curve affect the sound?
    if anyone is able to help with this please reply
    thanks
    BTW that line from the .sms was from the R142A
    https://www.youtube.com/user/m7train

    #2
    They alter the frequency at which the sound is played depending on the speed of the loco/wagon.The granularity is the space at which the computer samples the speed.The computer "plots" a virtual graph of frequency/volume vs speed to determine how it plays the sound.The explanation is in the techdocs.There are many files around with an error in the "granularity" statement,often quoting it as 100 when in fact it should always be a value much smaller than the maximum of the parameter on which the volume/frequency varies.

    Comment


      #3
      Originally posted by m7train View Post
      hello,
      i was working on a locomotive (LIRR m7 ) and i was working on the .sms file. i saw the following in the .sms of another train
      )
      FrequencyCurve(
      SpeedControlled
      CurvePoints ( 3
      -70.0 14000
      0.0 11025
      70.0 14000
      )
      Granularity ( 25 )
      )
      VolumeCurve(
      SpeedControlled
      CurvePoints ( 5
      -70.0 0.1
      -1.0 0.3
      0.0 0.0
      1.0 0.3
      70.0 0.1
      Originally posted by m7train View Post
      what do the numbers in the frequency curve do and how do they affect the sound?
      -70.0 14000
      In this "SpeedControlled" statement, the first number is the speed in meters per second (not mph). The second number is the frequency at which the sound will play in Hz. The way to look at this is that a standard MSTS sound is sampled at 11025Hz, so anything higher than that will play faster and sound higher in pitch and anything lower than that will play more slowly and sound lower in pitch.

      The statement Curvepoints ( 3 merely gives the number of lines for which you want to define frequencies.

      This allows you to change the pitch of a sound as the rolling stock increases/decreases in speed - it's useful for many different things, but rolling sounds, wheel noise, traction motor noises are clearly important sounds that can be controlled with such a curve.

      Originally posted by m7train View Post
      what is granularity?
      {further edit - disregard what I wrote and see Jeff "krausyao"'s explanation below - much better and more accurate!}
      This is merely the number of steps that MSTS will apply between the "Curve Points" you've defined in the statement above. The lower the number, the more steps there will be, but as with anything, the more MSTS has to update the sound, so there's a cost. Granularity can be adjusted if you notice a stepping in the sound as speed (or the other variables that can be use) increases/decreases. {edit - saw ragtimer's post after I wrote this - he's absolutely correct about that as well, the granularity MUST be consitent with the values controlled, in this case frequency - you wouldn't want to use a granularity (100) for a volume statement where the volume is in fractions!}

      Originally posted by m7train View Post
      AND how do the numbers in the volume curve affect the sound?
      In the sound lines, again, you have speed (in m/s) first, and then the volume as a fraction second. So those values are setting the volume for the sound as the speed increases/decreases. The trick here is to recognize that the volume is a fraction, that 1.0 indicates 100% volume (although I've seen values above 100% used in volume statements)

      That gives you two ways to control the sound as the speed increases, it can change in pitch but it can also get sofer or louder. Again, this is useful in speed related noises where they often are soft at low speed but can grow in volume at high speed. Also some sounds have a "resonance frequency" where they're actually louder in a certain speed range and then die down in volume outside that range - that can be accomplished as well. This can also be used where you have good sound samples of a sound for different speed ranges, like low, medium, and high, so one sound ramps down while another ramps up. Take a look at Kurt Kaminer's Comet sounds, or my Silverliner II sounds, where this was done.


      Originally posted by m7train View Post
      if anyone is able to help with this please reply
      thanks
      BTW that line from the .sms was from the R142A
      Take a look at a number of different pieces of rolling stock. You're welcome to borrow any of the .sms from my Silverliner II cars if you find it useful. If any of the sounds are useful, let me know and we can work out a deal.

      Steve
      Last edited by mestevet; 04-14-2009, 10:24 AM.

      Comment


        #4
        When plotting speed, X-axis, against frequency, Y-axis, granularity is how precise the Y-axis value is calculated.

        For your example, the formulas would be

        x < 0
        y = -42.5x + 11025

        x > 0
        y = 42.5x + 11025

        Then for a granularity of 25 apply y = 25 round(y/25). If x = 9.0 then y =11407.5 without granularity and y = 11400 with granularity. The units of the X-axis are m/s while the units of the Y-axis and granularity are Hz.
        Last edited by krausyao; 04-14-2009, 08:45 AM.
        Jeffrey Kraus-Yao
        Digital Rails Corporation
        http://www.digital-rails.us

        Comment


          #5
          okay,
          thanks for the help. i will work on the frequency curve today. i looked at the R142A .sms because it sounds the most similar to the lirr M7. i think i understand it now and i will work on it tonight. mestevet i'll look at the Silverliner II cars and if its useful i will let you know.
          thanks all,
          Trevor
          https://www.youtube.com/user/m7train

          Comment

          Working...
          X